diff mbox series

[09/14] qla2xxx: Force fw cleanup on ADISC error

Message ID 20180830163550.27288-10-himanshu.madhani@cavium.com (mailing list archive)
State Superseded
Headers show
Series qla2xxx: Driver updates for scsi-misc | expand

Commit Message

Madhani, Himanshu Aug. 30, 2018, 4:35 p.m. UTC
From: Quinn Tran <quinn.tran@cavium.com>

Turn ON logout_on_delete flag to make sure firmware
resource for fcport is cleaned up on ADISC error.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index fa6f2400a508..f840199d31cc 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -396,6 +396,9 @@  void qla24xx_handle_adisc_event(scsi_qla_host_t *vha, struct event_arg *ea)
 		ql_dbg(ql_dbg_disc, vha, 0x2066,
 		    "%s %8phC: adisc fail: post delete\n",
 		    __func__, ea->fcport->port_name);
+		/* deleted = 0 & logout_on_delete = force fw cleanup */
+		fcport->deleted = 0;
+		fcport->logout_on_delete = 1;
 		qlt_schedule_sess_for_deletion(ea->fcport);
 		return;
 	}