[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ide
Subject:    [PATCH 1/6] libata: Do not retry commands with valid autosense
From:       Hannes Reinecke <hare () suse ! de>
Date:       2015-07-31 13:02:03
Message-ID: 1438347728-106434-2-git-send-email-hare () suse ! de
[Download RAW message or body]

If a failed command has a valid autosense there is no need to
retry it on the ATA level; at best we're incurring the same
error again. So rather not retry it here, but leave it to
the SCSI layer to decide if a retry is in order.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/ata/libata-eh.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 7465031..1b4e9d1 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2218,6 +2218,8 @@ static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc)
 		return 1;	/* otherwise retry anything from fs stack */
 	if (qc->err_mask & AC_ERR_INVALID)
 		return 0;	/* don't retry these */
+	if (qc->flags & ATA_QCFLAG_SENSE_VALID)
+		return 0;	/* Autosense, no need to retry here */
 	return qc->err_mask != AC_ERR_DEV;  /* retry if not dev error */
 }
 
-- 
1.8.5.2

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

Configure | About | News | Add a list | Sponsored by KoreLogic