@@ -1660,6 +1660,7 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
req->rq_flags |= RQF_DONTPREP;
} else {
clear_bit(SCMD_STATE_COMPLETE, &cmd->state);
+ clear_bit(SCMD_NORETRIES_ABORT, &cmd->state);
}
cmd->flags &= SCMD_PRESERVED_FLAGS;
@@ -64,6 +64,9 @@ struct scsi_pointer {
/* for scmd->state */
#define SCMD_STATE_COMPLETE 0
#define SCMD_STATE_INFLIGHT 1
+#define SCMD_NORETRIES_ABORT 2 /* If this bit is set then there won't be any
+ * retries of scmd on abort success
+ */
struct scsi_cmnd {
struct scsi_request req;
Added a new definition SCMD_NORETRIES_ABORT in scsi_cmnd.h The SCMD_NORETRIES_ABORT defines the third bit postion in scmd->state Clearing the SCMD_NORETRIES_ABORT bit in state flag before blk_mq_start_request Signed-off-by: Muneendra <muneendra.kumar@broadcom.com> --- v6: Rearranged the patch by merging first hunk of the patch2 in v5 to this patch v5: No Change v4: No Change v3: No change v2: Modified the commit log --- drivers/scsi/scsi_lib.c | 1 + include/scsi/scsi_cmnd.h | 3 +++ 2 files changed, 4 insertions(+)