linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: fix handling of port actions in per-dev action mask
@ 2007-01-18  8:22 Tejun Heo
  2007-01-20  0:22 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2007-01-18  8:22 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide

libata EH ignores port-wide actions in per-dev action mask.  However,
device resume requests EH_SOFTRESET using per-dev action mask.  Under
certain circumstances, this results in not resetting frozen port after
resuming which causes failure of all commands.

This patch allows port-wide actions to be requested in per-dev action
mask.  Before EH recovery starts, port-wide actions will be collected.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
After being tested, this one should go into -stable too.

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 08ad44b..56cf59b 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1979,6 +1979,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 
 		ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
 
+		/* collect port action mask recorded in dev actions */
+		ehc->i.action |= ehc->i.dev_action[i] & ~ATA_EH_PERDEV_MASK;
+		ehc->i.dev_action[i] &= ATA_EH_PERDEV_MASK;
+
 		/* process hotplug request */
 		if (dev->flags & ATA_DFLAG_DETACH)
 			ata_eh_detach_dev(dev);

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

end of thread, other threads:[~2007-01-20  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18  8:22 [PATCH] libata: fix handling of port actions in per-dev action mask Tejun Heo
2007-01-20  0:22 ` 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).