scsi: megaraid_sas: Use DID_REQUEUE
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 10 Feb 2017 08:59:07 +0000 (00:59 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 21:06:00 +0000 (14:06 -0700)
Orabug: 26096381

Moving to use DID_REQUEUE return type for reliable unconditional
retries.  Driver wants unconditional re-queue, so replace DID_RESET with
DID_REQUEUE

Discussed below -
https://www.spinics.net/lists/linux-scsi/msg102848.html

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f55cf47d925e48cddabafd3bc829f1ebc05c334d)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c

index 3247cef5750ef6c0290778e6a46fb758c912eb43..1ef411379781536c78a764a7030d1f493a92ae86 100644 (file)
@@ -1670,7 +1670,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
        /* Check for an mpio path and adjust behavior */
        if (atomic_read(&instance->adprecovery) == MEGASAS_ADPRESET_SM_INFAULT) {
                if (megasas_check_mpio_paths(instance, scmd) ==
-                   (DID_RESET << 16)) {
+                   (DID_REQUEUE << 16)) {
                        return SCSI_MLQUEUE_HOST_BUSY;
                } else {
                        scmd->result = DID_NO_CONNECT << 16;
@@ -2494,7 +2494,7 @@ static int megasas_wait_for_outstanding(struct megasas_instance *instance)
                                                struct megasas_cmd, list);
                        list_del_init(&reset_cmd->list);
                        if (reset_cmd->scmd) {
-                               reset_cmd->scmd->result = DID_RESET << 16;
+                               reset_cmd->scmd->result = DID_REQUEUE << 16;
                                dev_notice(&instance->pdev->dev, "%d:%p reset [%02x]\n",
                                        reset_index, reset_cmd,
                                        reset_cmd->scmd->cmnd[0]);
index ac23e89bf077b15d69d1a45eda9275117f7638ca..a55d193b93c89381227651d32bb12aec763d1478 100644 (file)
@@ -3770,7 +3770,7 @@ int megasas_check_mpio_paths(struct megasas_instance *instance,
        struct scsi_cmnd *scmd)
 {
        struct megasas_instance *peer_instance = NULL;
-       int retval = (DID_RESET << 16);
+       int retval = (DID_REQUEUE << 16);
 
        if (instance->peerIsPresent) {
                peer_instance = megasas_get_peer_instance(instance);