@@ -986,7 +986,7 @@ static void qlt_free_session_done(struct work_struct *work)
sess->send_els_logo = 0;
}
- if (sess->logout_on_delete) {
+ if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) {
int rc;
rc = qla2x00_post_async_logout_work(vha, sess, NULL);
@@ -1045,8 +1045,7 @@ static void qlt_free_session_done(struct work_struct *work)
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) {
sess->conflict->login_pause = 0;
@@ -4600,9 +4599,9 @@ qlt_find_sess_invalidate_other(scsi_qla_host_t *vha, uint64_t wwn,
"Invalidating sess %p loop_id %d wwn %llx.\n",
other_sess, other_sess->loop_id, other_wwn);
-
other_sess->keep_nport_handle = 1;
- *conflict_sess = other_sess;
+ if (other_sess->disc_state != DSC_DELETED)
+ *conflict_sess = other_sess;
qlt_schedule_sess_for_deletion(other_sess,
true);
}