From: Tejun Heo Date: Mon, 25 Jun 2007 12:47:11 +0000 (+0900) Subject: libata: fix infinite EH waiting bug X-Git-Tag: MMI-PSA29.97-13-9~42556^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=914616a3c2a54504f3b0eda0b67fcd32226b3e83;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git libata: fix infinite EH waiting bug 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 45f81add150e..f7582c9c320e 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -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 */