Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc83b08f authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

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: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent be1066bb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1283,6 +1283,7 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
			destroy_cis_cache(skt);
			kfree(skt->fake_cis);
			skt->fake_cis = NULL;
			s->functions = 0;
			mutex_unlock(&s->ops_mutex);
			/* now, add the new card */
			ds_event(skt, CS_EVENT_CARD_INSERTION,