diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-04-29 09:56:25 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-05-03 08:34:44 -0400 |
commit | cc83b08fc791045ac197e6f4a030599bcd7100c5 (patch) | |
tree | 32c8ad8e154826205e9052125a061dd6fc4089e1 | |
parent | be1066bbcd443a65df312fdecea7e4959adedb45 (diff) |
pcmcia: avoid pccard_validate_cis failure in resume callpath
If the PCMCIA CIS changed before a resume event (e.g. due to
a card exchange while being suspended, possibly also during
a call to "pccardctl reset"), also set the function count to
zero so that the subsequent call to pccard_validate_cis() does
not fail.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | drivers/pcmcia/ds.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 508f94a2a78d..041eee43fd8d 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1283,6 +1283,7 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) | |||
1283 | destroy_cis_cache(skt); | 1283 | destroy_cis_cache(skt); |
1284 | kfree(skt->fake_cis); | 1284 | kfree(skt->fake_cis); |
1285 | skt->fake_cis = NULL; | 1285 | skt->fake_cis = NULL; |
1286 | s->functions = 0; | ||
1286 | mutex_unlock(&s->ops_mutex); | 1287 | mutex_unlock(&s->ops_mutex); |
1287 | /* now, add the new card */ | 1288 | /* now, add the new card */ |
1288 | ds_event(skt, CS_EVENT_CARD_INSERTION, | 1289 | ds_event(skt, CS_EVENT_CARD_INSERTION, |