Move blk_noretry_request check to scsi_queue_insert. Signed-off-by: Mike Anderson <andmike@xxxxxxxxxxxxxxxxxx> Acked-by: Mike Christie <michaelc@xxxxxxxxxxx> --- drivers/scsi/scsi_error.c | 15 +-------------- drivers/scsi/scsi_lib.c | 3 ++- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 55bf0e5..4eabb1a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1422,19 +1422,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) return FAILED; maybe_retry: - - /* we requeue for retry because the error was retryable, and - * the request was not marked fast fail. Note that above, - * even if the request is marked fast fail, we still requeue - * for queue congestion conditions (QUEUE_FULL or BUSY) */ - if (!blk_noretry_request(scmd->request)) { return NEEDS_RETRY; - } else { - /* - * no more retries - report this one back to upper level. - */ - return SUCCESS; - } } /** @@ -1551,8 +1539,7 @@ void scsi_eh_flush_done_q(struct list_head *done_q) list_for_each_entry_safe(scmd, next, done_q, eh_entry) { list_del_init(&scmd->eh_entry); - if (scsi_device_online(scmd->device) && - !blk_noretry_request(scmd->request)) { + if (scsi_device_online(scmd->device)) { SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush" " retry cmd: %p\n", current->comm, diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 557e511..2b65167 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -154,7 +154,8 @@ int scsi_queue_insert(struct scsi_cmnd *cmd, int reason) starget->target_blocked = starget->max_target_blocked; break; case SCSI_MLQUEUE_EH_RETRY: - if (++cmd->retries > cmd->allowed) { + if (blk_noretry_request(cmd->request) || + ++cmd->retries > cmd->allowed) { set_driver_byte(cmd, DRIVER_TIMEOUT); scsi_finish_command(cmd); return 0; -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html