Unverified Commit ffb5ee5b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7064 [sync] PR-7056: scsi: qla2xxx: Fix command flush on cable pull

parents 4baeb9ea 603f4254
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1038,6 +1038,16 @@ void qlt_free_session_done(struct work_struct *work)
		    "%s: sess %p logout completed\n", __func__, sess);
	}

	/* check for any straggling io left behind */
	if (!(sess->flags & FCF_FCP2_DEVICE) &&
	    qla2x00_eh_wait_for_pending_commands(sess->vha, sess->d_id.b24, 0, WAIT_TARGET)) {
		ql_log(ql_log_warn, vha, 0x3027,
		    "IO not return. Resetting.\n");
		set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
		qla2xxx_wake_dpc(vha);
		qla2x00_wait_for_chip_reset(vha);
	}

	if (sess->logo_ack_needed) {
		sess->logo_ack_needed = 0;
		qla24xx_async_notify_ack(vha, sess,