Commit 0f4c16a2 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: libfc: do not overwrite DID_TIME_OUT status

When a command is aborted it might already have the DID_TIME_OUT
status set, so we shouldn't be overwriting that.
Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 69aabcce
...@@ -2008,9 +2008,15 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp) ...@@ -2008,9 +2008,15 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp)
sc_cmd->result = (DID_ERROR << 16) | fsp->cdb_status; sc_cmd->result = (DID_ERROR << 16) | fsp->cdb_status;
break; break;
case FC_CMD_ABORTED: case FC_CMD_ABORTED:
FC_FCP_DBG(fsp, "Returning DID_ERROR to scsi-ml " if (host_byte(sc_cmd->result) == DID_TIME_OUT)
"due to FC_CMD_ABORTED\n"); FC_FCP_DBG(fsp, "Returning DID_TIME_OUT to scsi-ml "
sc_cmd->result = (DID_ERROR << 16) | fsp->io_status; "due to FC_CMD_ABORTED\n");
else {
FC_FCP_DBG(fsp, "Returning DID_ERROR to scsi-ml "
"due to FC_CMD_ABORTED\n");
set_host_byte(sc_cmd, DID_ERROR);
}
sc_cmd->result |= fsp->io_status;
break; break;
case FC_CMD_RESET: case FC_CMD_RESET:
FC_FCP_DBG(fsp, "Returning DID_RESET to scsi-ml " FC_FCP_DBG(fsp, "Returning DID_RESET to scsi-ml "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment