]> err.no Git - linux-2.6/commitdiff
libata: fix infinite EH waiting bug
authorTejun Heo <htejun@gmail.com>
Mon, 25 Jun 2007 12:47:11 +0000 (21:47 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 27 Jun 2007 06:44:21 +0000 (02:44 -0400)
When EH gives up after repeated exceptions, it doesn't't clear the
PENDING bit on exit which leaves PENDING bit set without EH actually
scheduled.  This makes ata_port_wait_eh() to wait forever makes rmmod
hang on such port.  Fix it by clearing the flag.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-eh.c

index 45f81add150e35f93f0a868fcb2791bfb958d2a9..f7582c9c320e029aa916912646ec48f0991c6467 100644 (file)
@@ -336,6 +336,7 @@ void ata_scsi_error(struct Scsi_Host *host)
                        }
                        ata_port_printk(ap, KERN_ERR, "EH pending after %d "
                                        "tries, giving up\n", ATA_EH_MAX_REPEAT);
+                       ap->pflags &= ~ATA_PFLAG_EH_PENDING;
                }
 
                /* this run is complete, make sure EH info is clear */