Commit b83156b5 authored by Dominik Brodowski's avatar Dominik Brodowski

pcmcia: avoid validate_cis failure on CIS override

Commit a8408c17 introduced a new check to pccard_validate_cis(),
which avoids any "late" calls to this function. This broke the
insertion of cards which require a CIS override which changes
the number of card functions. Fix this by asserting that this
is _not_ a late call, but a proper call early during the card
insertion process.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16138Reported-by: default avatarMikulas Patocka <mpatocka@redhat.com>
CC: <stable@kernel.org>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 287b87a3
...@@ -671,6 +671,7 @@ static void pcmcia_requery(struct pcmcia_socket *s) ...@@ -671,6 +671,7 @@ static void pcmcia_requery(struct pcmcia_socket *s)
if (old_funcs != new_funcs) { if (old_funcs != new_funcs) {
/* we need to re-start */ /* we need to re-start */
pcmcia_card_remove(s, NULL); pcmcia_card_remove(s, NULL);
s->functions = 0;
pcmcia_card_add(s); pcmcia_card_add(s);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment