From 962c8dcdd5fa680e2bd68320d54e797b6d8c17fe Mon Sep 17 00:00:00 2001 From: Muneendra Kumar Date: Thu, 7 Jan 2021 03:19:04 +0530 Subject: scsi: core: Add a new error code DID_TRANSPORT_MARGINAL in scsi.h Add code in scsi_result_to_blk_status to translate a new error DID_TRANSPORT_MARGINAL to the corresponding blk_status_t i.e BLK_STS_TRANSPORT. Add DID_TRANSPORT_MARGINAL case to scsi_decide_disposition(). Link: https://lore.kernel.org/r/1609969748-17684-2-git-send-email-muneendra.kumar@broadcom.com Reviewed-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Reviewed-by: Hannes Reinecke Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen --- drivers/scsi/scsi_error.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/scsi/scsi_error.c') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f11f51e2465f..28056ee498b3 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1861,6 +1861,12 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) * the fast io fail tmo fired), so send IO directly upwards. */ return SUCCESS; + case DID_TRANSPORT_MARGINAL: + /* + * caller has decided not to do retries on + * abort success, so send IO directly upwards + */ + return SUCCESS; case DID_ERROR: if (msg_byte(scmd->result) == COMMAND_COMPLETE && status_byte(scmd->result) == RESERVATION_CONFLICT) -- cgit v1.2.3