Skip to content

Commit 0ce8ab5

Browse files
Saurav Kashyapmartinkpetersen
authored andcommitted
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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e4fc78f commit 0ce8ab5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/scsi/qla2xxx/qla_nvme.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,19 +554,15 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
554554

555555
fcport = qla_rport->fcport;
556556

557-
if (!qpair || !fcport)
558-
return -ENODEV;
559-
560-
if (!qpair->fw_started || fcport->deleted)
557+
if (unlikely(!qpair || !fcport || fcport->deleted))
561558
return -EBUSY;
562559

563-
vha = fcport->vha;
564-
565560
if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
566561
return -ENODEV;
567562

568-
if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
569-
(qpair && !qpair->fw_started) || fcport->deleted)
563+
vha = fcport->vha;
564+
565+
if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags))
570566
return -EBUSY;
571567

572568
/*

0 commit comments

Comments
 (0)