]> git.baikalelectronics.ru Git - kernel.git/commitdiff
pcmcia: give socket time to power down
authorDaniel Ritz <daniel.ritz-ml@swissonline.ch>
Tue, 31 Jul 2007 07:38:08 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:38 +0000 (15:39 -0700)
Give sockets up to 100ms of additional time to power down.  otherwise we
might generate false warnings with KERN_ERR priority (like in bug #8262).

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Nils Neumann <nils.neumann@rwth-aachen.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pcmcia/cs.c

index 7c93a108f9b81f4c88ba67ae1a5f0686fc003b6a..f8b13f0270d744f87d766072599de14760aa821e 100644 (file)
@@ -409,6 +409,9 @@ static void socket_shutdown(struct pcmcia_socket *s)
 #endif
        s->functions = 0;
 
+       /* give socket some time to power down */
+       msleep(100);
+
        s->ops->get_status(s, &status);
        if (status & SS_POWERON) {
                printk(KERN_ERR "PCMCIA: socket %p: *** DANGER *** unable to remove socket power\n", s);