Thread (2 messages) 2 messages, 2 authors, 2007-06-27
STALE6971d

[PATCH 2.6.22-rc5] libata: fix infinite EH waiting bug

From: Tejun Heo <hidden>
Date: 2007-06-25 12:47:16
Subsystem: libata subsystem (serial and parallel ata drivers), the rest · Maintainers: Damien Le Moal, Niklas Cassel, Linus Torvalds

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 <redacted>
---
 drivers/ata/libata-eh.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index d807098..fbdfefb 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 */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help