linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22-rc5] libata: fix infinite EH waiting bug
@ 2007-06-25 12:47 Tejun Heo
  2007-06-27  6:45 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2007-06-25 12:47 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide@vger.kernel.org

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>
---
 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 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.22-rc5] libata: fix infinite EH waiting bug
  2007-06-25 12:47 [PATCH 2.6.22-rc5] libata: fix infinite EH waiting bug Tejun Heo
@ 2007-06-27  6:45 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-06-27  6:45 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide@vger.kernel.org

Tejun Heo wrote:
> 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>
> ---
>  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;
>  		}
>  

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-27  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-25 12:47 [PATCH 2.6.22-rc5] libata: fix infinite EH waiting bug Tejun Heo
2007-06-27  6:45 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).