Commit ba743f91 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Clear loop id after delete

Clear loop id after delete to prevent session invalidation of stale
session.

Fixes: 726b8548 ("qla2xxx: Add framework for async fabric discovery")
Cc: <stable@vger.kernel.org> # 4.10+
Signed-off-by: default avatarQuinn Tran <quinn.tran@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 76f9a2dd
...@@ -985,7 +985,7 @@ static void qlt_free_session_done(struct work_struct *work) ...@@ -985,7 +985,7 @@ static void qlt_free_session_done(struct work_struct *work)
qlt_send_first_logo(vha, &logo); qlt_send_first_logo(vha, &logo);
} }
if (sess->logout_on_delete) { if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) {
int rc; int rc;
rc = qla2x00_post_async_logout_work(vha, sess, NULL); rc = qla2x00_post_async_logout_work(vha, sess, NULL);
...@@ -1044,7 +1044,6 @@ static void qlt_free_session_done(struct work_struct *work) ...@@ -1044,7 +1044,6 @@ static void qlt_free_session_done(struct work_struct *work)
sess->login_succ = 0; sess->login_succ = 0;
} }
if (sess->chip_reset != ha->base_qpair->chip_reset)
qla2x00_clear_loop_id(sess); qla2x00_clear_loop_id(sess);
if (sess->conflict) { if (sess->conflict) {
...@@ -4599,8 +4598,8 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn, ...@@ -4599,8 +4598,8 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn,
"Invalidating sess %p loop_id %d wwn %llx.\n", "Invalidating sess %p loop_id %d wwn %llx.\n",
other_sess, other_sess->loop_id, other_wwn); other_sess, other_sess->loop_id, other_wwn);
other_sess->keep_nport_handle = 1; other_sess->keep_nport_handle = 1;
if (other_sess->disc_state != DSC_DELETED)
*conflict_sess = other_sess; *conflict_sess = other_sess;
qlt_schedule_sess_for_deletion(other_sess, qlt_schedule_sess_for_deletion(other_sess,
true); true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment