[PATCH RFC 10/22] scsi: Allow passthrough to request infinite retries

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

 



hp_sw and rdac request unimited retries for their failover commands. This
allows them to request this by using a special value.

Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
---
 drivers/scsi/scsi_error.c | 3 ++-
 include/scsi/scsi_cmnd.h  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 059c5f40d236..ea79bad4b865 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1881,7 +1881,8 @@ static enum scsi_disposition scsi_check_passthrough(struct scsi_cmnd *scmd)
 	return SCSI_RETURN_NOT_HANDLED;
 
 maybe_retry:
-	if (++failure->retries <= failure->allowed)
+	if (failure->allowed == SCMD_FAILURE_NO_LIMIT ||
+	    ++failure->retries <= failure->allowed)
 		return NEEDS_RETRY;
 
 	return SUCCESS;
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index ee3986401f52..cb1191ff698c 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -69,6 +69,7 @@ enum scsi_cmnd_submitter {
 #define SCMD_FAILURE_ANY	0xffffffff
 #define SCMD_FAILURE_ASC_ANY	0xff
 #define SCMD_FAILURE_ASCQ_ANY	0xff
+#define SCMD_FAILURE_NO_LIMIT	255
 
 struct scsi_failure {
 	u8 sense;
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux