Skip to contentSkip to conversation

Patch "scsi: qla2xxx: Fix re-login for Nport Handle in use" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Mar 13, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

scsi: qla2xxx: Fix re-login for Nport Handle in use

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a084fd68e1d26174c4cc1a13fbb0112f468ff7f4 Mon Sep 17 00:00:00 2001

From: Quinn Tran <[email protected]>
Date: Mon, 4 Dec 2017 14:45:00 -0800
Subject: scsi: qla2xxx: Fix re-login for Nport Handle in use

From: Quinn Tran <[email protected]>

commit a084fd68e1d26174c4cc1a13fbb0112f468ff7f4 upstream.

When NPort Handle is in use, driver needs to mark the handle as used and pick another. Instead, the code clears the handle and re-pick the same handle.

Fixes 726b85487067d ("qla2xxx: Add framework for async fabric discovery")
Cc <[email protected]> # 4.10+
---
 drivers/scsi/qla2xxx/qla_gs.c   |   16 ++++++++++----
 drivers/scsi/qla2xxx/qla_init.c |   44 ++++++++++++++++++++++++++++++++++++----
 drivers/scsi/qla2xxx/qla_isr.c  |    5 ----
 3 files changed, 51 insertions(+), 14 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +11 -5
@@ -2833,7 +2833,7 @@ void qla24xx_handle_gidpn_event(scsi_qla
 				}
 			} else { /* fcport->d_id.b24 != ea->id.b24 */
 				fcport->d_id.b24 = ea->id.b24;
-				if (fcport->deleted == QLA_SESS_DELETED) {
+				if (fcport->deleted != QLA_SESS_DELETED) {
 					ql_dbg(ql_dbg_disc, vha, 0x2021,
 					    "%s %d %8phC post del sess\n",
 					    __func__, __LINE__, fcport->port_name);
@@ -3206,10 +3206,16 @@ static void qla2x00_async_gpnid_sp_done(
 	struct event_arg ea;
 	struct qla_work_evt *e;
 
-	ql_dbg(ql_dbg_disc, vha, 0x2066,
-	    "Async done-%s res %x ID %3phC. %8phC\n",
-	    sp->name, res, ct_req->req.port_id.port_id,
-	    ct_rsp->rsp.gpn_id.port_name);
+	if (res)
+		ql_dbg(ql_dbg_disc, vha, 0x2066,
+		    "Async done-%s fail res %x ID %3phC. %8phC\n",
+		    sp->name, res, ct_req->req.port_id.port_id,
+		    ct_rsp->rsp.gpn_id.port_name);
+	else
+		ql_dbg(ql_dbg_disc, vha, 0x2066,
+		    "Async done-%s good ID %3phC. %8phC\n",
+		    sp->name, ct_req->req.port_id.port_id,
+		    ct_rsp->rsp.gpn_id.port_name);
 
 	if (res) {
 		sp->free(sp);
drivers/scsi/qla2xxx/qla_init.c +40 -4

62 lines not on this page · raw message

drivers/scsi/qla2xxx/qla_isr.c +0 -5
@@ -2341,7 +2341,6 @@ qla2x00_status_entry(scsi_qla_host_t *vh
 	int res = 0;
 	uint16_t state_flags = 0;
 	uint16_t retry_delay = 0;
-	uint8_t no_logout = 0;
 
 	sts = (sts_entry_t *) pkt;
 	sts24 = (struct sts_entry_24xx *) pkt;
@@ -2612,7 +2611,6 @@ check_scsi_status:
 		break;
 
 	case CS_PORT_LOGGED_OUT:
-		no_logout = 1;
 	case CS_PORT_CONFIG_CHG:
 	case CS_PORT_BUSY:
 	case CS_INCOMPLETE:
@@ -2643,9 +2641,6 @@ check_scsi_status:
 				port_state_str[atomic_read(&fcport->state)],
 				comp_status);
 
-			if (no_logout)
-				fcport->logout_on_delete = 0;
-
 			qla2x00_mark_device_lost(fcport->vha, fcport, 1, 1);
 			qlt_schedule_sess_for_deletion_lock(fcport);
 		}

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/scsi-qla2xxx-retry-switch-command-on-time-out.patch queue-4.14/scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch queue-4.14/scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch queue-4.14/scsi-qla2xxx-fix-login-state-machine-stuck-at-gpdb.patch queue-4.14/scsi-qla2xxx-fix-system-crash-for-notify-ack-timeout-handling.patch queue-4.14/scsi-qla2xxx-replace-fcport-alloc-with-qla2x00_alloc_fcport.patch queue-4.14/scsi-qla2xxx-clear-loop-id-after-delete.patch queue-4.14/scsi-qla2xxx-fix-relogin-being-triggered-too-fast.patch queue-4.14/scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch queue-4.14/scsi-qla2xxx-fix-scan-state-field-for-fcport.patch queue-4.14/scsi-qla2xxx-fix-prli-state-check.patch queue-4.14/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch queue-4.14/scsi-qla2xxx-serialize-gpnid-for-multiple-rscn.patch queue-4.14/scsi-qla2xxx-fix-gpnid-error-processing.patch queue-4.14/scsi-qla2xxx-move-session-delete-to-driver-work-queue.patch