linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: cleanup SAT error translation
@ 2013-06-14 20:48 Gwendal Grignou
  2013-06-17 19:48 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Gwendal Grignou @ 2013-06-14 20:48 UTC (permalink / raw)
  To: tj; +Cc: linux-ide, Gwendal Grignou

Remove duplicate Medium Error Entry.
Remove the ABRT entry: it is too broad: when only ABRT is set
we should look at status for more information.
Only if status does not provide information we set ABORTED_COMMAND
sense key.

Tested: When a disk fails, it sets
Status = 0x71 [DRDY DF ERR] , Error = 0x4 [ABRT]
Ensure the sense key is HARDWARE_ERROR.
When there is a simple command syntax error:
Status = 0x51 [DRDY ERR] , Error = 0x4 [ABRT]
Ensure the sense key is ABORTED_COMMAND.

Signed-off-by: Gwendal Grignou <gwendal@google.com>
---
 drivers/ata/libata-scsi.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index dd310b27..1724189 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -850,14 +850,10 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,
 		{0x01, 		MEDIUM_ERROR, 0x13, 0x00}, 	// Address mark not found       Address mark not found for data field
 		/* TRK0 */
 		{0x02, 		HARDWARE_ERROR, 0x00, 0x00}, 	// Track 0 not found		  Hardware error
-		/* Abort & !ICRC */
-		{0x04, 		ABORTED_COMMAND, 0x00, 0x00}, 	// Aborted command              Aborted command
 		/* Media change request */
 		{0x08, 		NOT_READY, 0x04, 0x00}, 	// Media change request	  FIXME: faking offline
 		/* SRV */
 		{0x10, 		ABORTED_COMMAND, 0x14, 0x00}, 	// ID not found                 Recorded entity not found
-		/* Media change */
-		{0x08,  	NOT_READY, 0x04, 0x00}, 	// Media change		  FIXME: faking offline
 		/* ECC */
 		{0x40, 		MEDIUM_ERROR, 0x11, 0x04}, 	// Uncorrectable ECC error      Unrecovered read error
 		/* BBD - block marked bad */
-- 
1.8.3


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

end of thread, other threads:[~2013-06-18 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 20:48 [PATCH] ata: cleanup SAT error translation Gwendal Grignou
2013-06-17 19:48 ` Tejun Heo
2013-06-18 17:54   ` [PATCH v2] " Gwendal Grignou
2013-06-18 18:37     ` Tejun Heo

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).