linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH #upstream-fixes 1/4] libata: fix EH action overwriting in ata_eh_reset()
@ 2008-07-31  7:07 Tejun Heo
  2008-07-31  7:08 ` [PATCH 2/4 #upstream-fixes] libata: always do follow-up SRST if hardreset returned -EAGAIN Tejun Heo
  2008-08-22  6:20 ` [PATCH #upstream-fixes 1/4] libata: fix EH action overwriting in ata_eh_reset() Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Tejun Heo @ 2008-07-31  7:07 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Alan Cox

ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in
ata_eh_reset().  The original intention was to clear reset action
which wasn't selected.  This can cause unexpected behavior when other
EH actions are scheduled together with reset.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 drivers/ata/libata-eh.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 58bdc53..a3c0139 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2247,10 +2247,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
 	ehc->i.action &= ~ATA_EH_RESET;
 	if (hardreset) {
 		reset = hardreset;
-		ehc->i.action = ATA_EH_HARDRESET;
+		ehc->i.action |= ATA_EH_HARDRESET;
 	} else if (softreset) {
 		reset = softreset;
-		ehc->i.action = ATA_EH_SOFTRESET;
+		ehc->i.action |= ATA_EH_SOFTRESET;
 	}
 
 	if (prereset) {
-- 
1.5.4.5


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

end of thread, other threads:[~2008-08-22  6:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31  7:07 [PATCH #upstream-fixes 1/4] libata: fix EH action overwriting in ata_eh_reset() Tejun Heo
2008-07-31  7:08 ` [PATCH 2/4 #upstream-fixes] libata: always do follow-up SRST if hardreset returned -EAGAIN Tejun Heo
2008-07-31  7:08   ` [PATCH #upstream-fixes 3/4] libata: use ata_link_printk() when printing SError Tejun Heo
2008-07-31  7:09     ` [PATCH 4/4] libata: restore SControl on detach Tejun Heo
2008-08-22  6:20 ` [PATCH #upstream-fixes 1/4] libata: fix EH action overwriting in ata_eh_reset() 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).