Incorrect card recognition

David Hinds dhinds at sonic.net
Fri Oct 3 15:30:30 BST 2003


On Fri, Oct 03, 2003 at 03:19:39PM -0500, Larry W. Finger wrote:
> 
> I have a problem with my Adaptec APA1460B SlimSCSI card. When I start 
> cardmgr and plug the card in, the system fails to read the CIS and tries to 
> load memory_cs. If I issue a kill -HUP to cardmgr and replug the card, it 
> is properly recognized.

It would help to show system log messages.

> This is where the two diverge. At the printk statement below, the incorrect 
> case has force_low, hi and lo all equal to zero, inv_probe is called and 
> the system does a memory probe from 0xa0000000 to 0xa0ffffff. The correct 
> case has hi == 1, thus the second part of the if is bypassed and inv_probe 
> is not called. Here is where I get lost. Why is it necessary to preserve 
> the values of hi and lo across calls? If hi and lo are not declared static, 
> the code never works. Is this the case of two wrongs making a right? Please 
> let me know if you need more information.

The hi and lo variables are supposed to indicate whether or not probes
have been done for "high" memory windows (>1MB) or "low" memory
windows (<1MB).  They are static because the probes should be done
just once.  There is a bug here, though, because they should be reset
when you "kill -HUP" cardmgr.  This is done in the pcmcia-cs modules
but I guess I forgot to migrate that fix to the kernel tree.

This does not explain why the probe is not working correctly.

-- Dave



More information about the linux-pcmcia mailing list