Skip to content

Commit cc83b08

Browse files
author
Dominik Brodowski
committed
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>
1 parent be1066b commit cc83b08

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pcmcia/ds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,7 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
12831283
destroy_cis_cache(skt);
12841284
kfree(skt->fake_cis);
12851285
skt->fake_cis = NULL;
1286+
s->functions = 0;
12861287
mutex_unlock(&s->ops_mutex);
12871288
/* now, add the new card */
12881289
ds_event(skt, CS_EVENT_CARD_INSERTION,

0 commit comments

Comments
 (0)