Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: libfc: Map FC_TIMED_OUT to DID_TIME_OUT

When an exchange is completed with FC_TIMED_OUT we should map it to
DID_TIME_OUT to inform the SCSI midlayer that this was a command timeout;
DID_BUS_BUSY implies that the command was never sent which is not the case
here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20231129165832.224100-4-hare@kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Hannes Reinecke and committed by
Martin K. Petersen
be40572c 53122a49

+2 -2
+2 -2
drivers/scsi/libfc/fc_fcp.c
··· 2062 2062 sc_cmd->result = (DID_PARITY << 16); 2063 2063 break; 2064 2064 case FC_TIMED_OUT: 2065 - FC_FCP_DBG(fsp, "Returning DID_BUS_BUSY to scsi-ml " 2065 + FC_FCP_DBG(fsp, "Returning DID_TIME_OUT to scsi-ml " 2066 2066 "due to FC_TIMED_OUT\n"); 2067 - sc_cmd->result = (DID_BUS_BUSY << 16) | fsp->io_status; 2067 + sc_cmd->result = (DID_TIME_OUT << 16); 2068 2068 break; 2069 2069 default: 2070 2070 FC_FCP_DBG(fsp, "Returning DID_ERROR to scsi-ml "