qla2xxx-32gbit: fc_remote_port_chkready() returns a SCSI result value

fc_remote_port_chkready() returns a SCSI result value, not the port
status. Fix the value returned when the remote port isn't set.

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

[ commit 6098c3005d5a39c39331ca6c3d9fa7525247166c upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-03-15 03:11:35 +00:00
parent 3a8b79eb3d
commit fca3497c59

View File

@@ -999,7 +999,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
srb_t *sp;
int rval;
rval = rport ? fc_remote_port_chkready(rport) : FC_PORTSTATE_OFFLINE;
rval = rport ? fc_remote_port_chkready(rport) : (DID_NO_CONNECT << 16);
if (rval) {
cmd->result = rval;
ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x3076,