Message ID | 20201202115249.37690-33-hare@suse.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | SCSI result handling cleanup, part 1 | expand |
On Wed, Dec 02, 2020 at 12:52:47PM +0100, Hannes Reinecke wrote: > fc_remote_port_chkready() returns a SCSI result value, not the > port status. So fixup the value when the remote port isn't set. > > Signed-off-by: Hannes Reinecke <hare@suse.de> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
> On Dec 2, 2020, at 5:52 AM, Hannes Reinecke <hare@suse.de> wrote: > > fc_remote_port_chkready() returns a SCSI result value, not the > port status. So fixup the value when the remote port isn't set. > > Signed-off-by: Hannes Reinecke <hare@suse.de> > --- > drivers/scsi/qla2xxx/qla_os.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c > index f9c8ae9d669e..419f97467c15 100644 > --- a/drivers/scsi/qla2xxx/qla_os.c > +++ b/drivers/scsi/qla2xxx/qla_os.c > @@ -957,7 +957,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, > -- > 2.16.4 > Looks Good. Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> -- Himanshu Madhani Oracle Linux Engineering
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index f9c8ae9d669e..419f97467c15 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -957,7 +957,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,
fc_remote_port_chkready() returns a SCSI result value, not the port status. So fixup the value when the remote port isn't set. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)