[SCSI] hpsa: retry commands completing with status of UNSOLICITED_ABORT
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Tue, 26 Jul 2011 16:08:52 +0000 (11:08 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 27 Jul 2011 11:35:49 +0000 (15:35 +0400)
In a shared SAS setup, target devices may be reset by one of
several hosts, and outstanding commands on that device will be
completed to corresponding hosts with status of UNSOLICITED_ABORT.
Such commands should be retried instead of being treated as i/o
errors.  Also fixed a nearby spelling error.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c

index 6bba23a2630339fde5e29976c220d771dff0ba54..b64b29f648fd4c9cab77bb6852a35e997e438323 100644 (file)
@@ -1219,8 +1219,8 @@ static void complete_scsi_command(struct CommandList *cp)
                dev_warn(&h->pdev->dev, "cp %p reports abort failed\n", cp);
                break;
        case CMD_UNSOLICITED_ABORT:
-               cmd->result = DID_RESET << 16;
-               dev_warn(&h->pdev->dev, "cp %p aborted do to an unsolicited "
+               cmd->result = DID_SOFT_ERROR << 16; /* retry the command */
+               dev_warn(&h->pdev->dev, "cp %p aborted due to an unsolicited "
                        "abort\n", cp);
                break;
        case CMD_TIMEOUT: