]> git.hungrycats.org Git - linux/commit
[PCMCIA] Don't cache CIS bytes found to be invalid.
authorRussell King <rmk@flint.arm.linux.org.uk>
Wed, 23 Apr 2003 22:18:16 +0000 (23:18 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Wed, 23 Apr 2003 22:18:16 +0000 (23:18 +0100)
commit4de24fcf8ccd1a5d71951240116a0e7775967951
treed9e70bfd0cbd71d269b1e936cabfa77a0218412d
parent568c335538b95f28e694ee22faa40598c694256e
[PCMCIA] Don't cache CIS bytes found to be invalid.

Several PCMCIA cards I have here do not work correctly over a
suspend/resume cycle; the PCMCIA code believes that the card has
been changed in the slot, and therefore performs a remove/insert
cycle.

This seems to be because the card returns more or less random data
when reading memory space, leading to the CIS cache mismatching
the card data.  This in turn is caused because we try to read CIS
data from both the attribute and memory spaces, and we add the result
to the CIS cache whether or not the returned data was valid.

We therefore convert the CIS cache to use a linked list, and provide
a way to remove cached data from that list.  We also replace the
"s->cis_used=0;" construct with a function "destroy_cis_cache(s)"
which clearly describes what we're doing.
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs.c
drivers/pcmcia/cs_internal.h
drivers/pcmcia/rsrc_mgr.c