summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHimanshu Madhani <hmadhani@marvell.com>2019-02-15 23:37:15 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-20 00:58:36 +0100
commit471f8e03d74d9ea1084e7fbbba66ea2488b0c14f (patch)
tree3b80037e9d08bb2a8896179f2a9af5377dc62af9 /drivers/scsi
parentscsi: qla2xxx: Fix unload when NVMe devices are configured (diff)
downloadlinux-471f8e03d74d9ea1084e7fbbba66ea2488b0c14f.tar.xz
linux-471f8e03d74d9ea1084e7fbbba66ea2488b0c14f.zip
scsi: qla2xxx: Check for FW started flag before aborting
For FC-NVMe, if the fw_started flag is not set or fcport is deleted, then do not send Abort command Signed-off-by: Himanshu Madhani <hmadhani@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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 232b987e79dd..41c85da3ab32 100644
--- a/drivers/scsi/qla2xxx/qla_nvme.c
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
@@ -185,6 +185,14 @@ static void qla_nvme_abort_work(struct work_struct *work)
struct qla_hw_data *ha = fcport->vha->hw;
int rval;
+ if (fcport)
+ ql_dbg(ql_dbg_io, fcport->vha, 0xffff,
+ "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n",
+ __func__, sp, sp->handle, fcport, fcport->deleted);
+
+ if (!ha->flags.fw_started && (fcport && fcport->deleted))
+ return;
+
rval = ha->isp_ops->abort_command(sp);
ql_dbg(ql_dbg_io, fcport->vha, 0x212b,