summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_sup.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2018-07-18 23:29:53 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-20 04:02:34 +0200
commit45235022da9925b2b070c0139629233173e50089 (patch)
treec56da4f3859f68342f6d21d9f2c5d972f0b50d9c /drivers/scsi/qla2xxx/qla_sup.c
parentscsi: qla2xxx: Fix NPIV deletion by calling wait_for_sess_deletion (diff)
downloadlinux-45235022da9925b2b070c0139629233173e50089.tar.xz
linux-45235022da9925b2b070c0139629233173e50089.zip
scsi: qla2xxx: Fix driver unload by shutting down chip
Use chip shutdown at the start of unload to stop all DMA + traffic and bring down the laser. This prevents any link activities from triggering the driver to be re-engaged. Fixes: 4b60c82736d0 ("scsi: qla2xxx: Add fw_started flags to qpair") Cc: <stable@vger.kernel.org> #4.16 Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_sup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index 04458eb19d38..4499c787165f 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -1880,6 +1880,9 @@ qla24xx_beacon_off(struct scsi_qla_host *vha)
if (IS_P3P_TYPE(ha))
return QLA_SUCCESS;
+ if (!ha->flags.fw_started)
+ return QLA_SUCCESS;
+
ha->beacon_blink_led = 0;
if (IS_QLA2031(ha) || IS_QLA27XX(ha))