[PATCH 1/18] [PATCH] libata: generate hotplug event on SError read failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ata_eh_autopsy() used to schedule hardreset for phys which failed to
return SError, which isn't enough for some cases.  Assume the worst
and generate hotplug event instead.  Note that scr_read() is
guaranteed to succeed for host ports.  This change affects only PMP
links.

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

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 6787fbc..2067db0 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1327,8 +1327,10 @@ static void ata_eh_autopsy(struct ata_po
 	if (rc == 0) {
 		ehc->i.serror |= serror;
 		ata_eh_analyze_serror(ap);
-	} else if (rc != -EOPNOTSUPP)
-		ehc->i.action |= ATA_EH_HARDRESET;
+	} else if (rc != -EOPNOTSUPP) {
+		/* hmmm, assume the worst and generate hotplug event */
+		__ata_ehi_hotplugged(&ehc->i);
+	}
 
 	/* analyze NCQ failure */
 	ata_eh_analyze_ncq_error(ap);
-- 
1.4.2.3


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux