]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pcmcia: avoid validate_cis failure on CIS override
authorDominik Brodowski <linux@dominikbrodowski.net>
Mon, 7 Jun 2010 16:31:17 +0000 (18:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:44 +0000 (11:22 -0700)
commit b83156b52dd77979cc93bafc2283929532f6f7d0 upstream.

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=16138

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pcmcia/ds.c

index 041eee43fd8d67b03a690abe0341039949e43cfc..6df5dffd49af5261a10f6f2713cf52fca2d7cc88 100644 (file)
@@ -682,6 +682,7 @@ static void pcmcia_requery(struct pcmcia_socket *s)
                if (old_funcs != new_funcs) {
                        /* we need to re-start */
                        pcmcia_card_remove(s, NULL);
+                       s->functions = 0;
                        pcmcia_card_add(s);
                }
        }