summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_target.c
diff options
context:
space:
mode:
authorQuinn Tran <qutran@marvell.com>2019-09-12 20:09:08 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-09-24 05:09:43 +0200
commitf5187b7d1ac66b61676f896751d3af9fcf8dd592 (patch)
treebd510eeca04827def2185bff2fe40f50bd812976 /drivers/scsi/qla2xxx/qla_target.c
parentscsi: qla2xxx: Fix stale mem access on driver unload (diff)
downloadlinux-f5187b7d1ac66b61676f896751d3af9fcf8dd592.tar.xz
linux-f5187b7d1ac66b61676f896751d3af9fcf8dd592.zip
scsi: qla2xxx: Optimize NPIV tear down process
In the case of NPIV port is being torn down, this patch will set a flag to indicate VPORT_DELETE. This would prevent relogin to be triggered. Link: https://lore.kernel.org/r/20190912180918.6436-5-hmadhani@marvell.com Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index b5315be00b4d..a06e56224a55 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -1115,6 +1115,7 @@ void qlt_free_session_done(struct work_struct *work)
wake_up_all(&tgt->waitQ);
if (!test_bit(PFLG_DRIVER_REMOVING, &base_vha->pci_flags) &&
+ !(vha->vp_idx && test_bit(VPORT_DELETE, &vha->dpc_flags)) &&
(!tgt || !tgt->tgt_stop) && !LOOP_TRANSITION(vha)) {
switch (vha->host->active_mode) {
case MODE_INITIATOR: