All of lore.kernel.org
 help / color / mirror / Atom feed
* [libata PATCH 1/1] libata: thaw port after maximum reset retries
@ 2009-09-11 15:27 Chaitanya Lala
  2009-11-09  8:17 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Lala @ 2009-09-11 15:27 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, ajones, rbecker, clala

The libata error recovery tries to reset a port a number
of times and if unsuccessful, gives up. The code does not
thaw the port before it exits. If the bad disk i.e. the disk
that could not be reset is removed and a healthy disk is
inserted, the new disk does not register, since the port is
frozen. This patch fixes the same.

Signed-off-by: Chaitanya Lala <clala@riverbed.com>
---
 drivers/ata/libata-eh.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 79711b6..724f86f 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2637,8 +2637,12 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	    sata_scr_read(link, SCR_STATUS, &sstatus))
 		rc = -ERESTART;
 
-	if (rc == -ERESTART || try >= max_tries)
+	if (rc == -ERESTART || try >= max_tries) {
+		/* thaw the port */
+		if (ata_is_host_link(link))
+			ata_eh_thaw_port(ap);
 		goto out;
+	}
 
 	now = jiffies;
 	if (time_before(now, deadline)) {
-- 
1.6.0.4


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

* Re: [libata PATCH 1/1] libata: thaw port after maximum reset retries
  2009-09-11 15:27 [libata PATCH 1/1] libata: thaw port after maximum reset retries Chaitanya Lala
@ 2009-11-09  8:17 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2009-11-09  8:17 UTC (permalink / raw)
  To: Chaitanya Lala; +Cc: jgarzik, linux-ide, ajones, rbecker

Chaitanya Lala wrote:
> The libata error recovery tries to reset a port a number
> of times and if unsuccessful, gives up. The code does not
> thaw the port before it exits. If the bad disk i.e. the disk
> that could not be reset is removed and a healthy disk is
> inserted, the new disk does not register, since the port is
> frozen. This patch fixes the same.

Sorry about the long delay but has this actually happen?  The
rationale for not thawing there was that if the port was behaving
erratically, it could cause IRQ storm and thus take the whole
controller down and the port can be revived by issuing rescan if the
administrator intends to do so.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2009-11-09  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 15:27 [libata PATCH 1/1] libata: thaw port after maximum reset retries Chaitanya Lala
2009-11-09  8:17 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.