diff options
author | Saurav Kashyap <skashyap@marvell.com> | 2020-12-02 05:23:02 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-12-09 11:34:17 -0500 |
commit | 0ce8ab50a6ed7c10bc3b7fc00d4aa5b67b5f9e2c (patch) | |
tree | 172b84ffc23fc17a3a8e7f2d0609b07cfedbab69 /drivers/scsi | |
parent | e4fc78f48d3f8a9ea49e4b24878ac48dc9a58744 (diff) |
scsi: qla2xxx: Don't check for fw_started while posting NVMe command
NVMe commands can come only after successful addition of rport and NVMe
connect, and rport is only registered after FW started bit is set. Remove
the redundant check.
Link: https://lore.kernel.org/r/20201202132312.19966-6-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nvme.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index b7a1dc24db38..d4159d5a4ffd 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, fcport = qla_rport->fcport; - if (!qpair || !fcport) - return -ENODEV; - - if (!qpair->fw_started || fcport->deleted) + if (unlikely(!qpair || !fcport || fcport->deleted)) return -EBUSY; - vha = fcport->vha; - if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED)) return -ENODEV; - if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || - (qpair && !qpair->fw_started) || fcport->deleted) + vha = fcport->vha; + + if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) return -EBUSY; /* |