Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-10-12 12:14:58 +0200
committerHannes Reinecke <hare@suse.de>2018-10-12 12:40:41 +0200
commit82af7480e585c712b27d6dcba62411b32bdad8dd (patch)
tree40113d20eda727c542bf41b51f04424e2859fd04
parentd3511aeaf82d52a905e1a7a7bbc5c5b08af33746 (diff)
scsi: qla2xxx: Fix re-using LoopID when handle is in use
(bsc#1108870).
-rw-r--r--patches.fixes/scsi-qla2xxx-Fix-re-using-LoopID-when-handle-is-in-u.patch77
-rw-r--r--series.conf1
2 files changed, 78 insertions, 0 deletions
diff --git a/patches.fixes/scsi-qla2xxx-Fix-re-using-LoopID-when-handle-is-in-u.patch b/patches.fixes/scsi-qla2xxx-Fix-re-using-LoopID-when-handle-is-in-u.patch
new file mode 100644
index 0000000000..4675157145
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-Fix-re-using-LoopID-when-handle-is-in-u.patch
@@ -0,0 +1,77 @@
+From: Quinn Tran <quinn.tran@cavium.com>
+Date: Wed, 26 Sep 2018 22:05:14 -0700
+Subject: [PATCH] scsi: qla2xxx: Fix re-using LoopID when handle is in use
+Git-commit: 5c6400536481d9ef44ef94e7bf2c7b8e81534db7
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+Patch-mainline: Queued in subsystem maintainer repository
+References: bsc#1108870
+
+This patch fixes issue where driver clears NPort ID map instead of marking
+handle in use. Once driver clears NPort ID from the database, it can reuse
+the same NPort ID resulting in a PLOGI failure.
+
+[mkp: fixed Himanshu's SoB]
+
+Fixes: a084fd68e1d2 ("scsi: qla2xxx: Fix re-login for Nport Handle in use")
+Cc: <stable@vger.kernel.org>
+Signed-of-by: Quinn Tran <quinn.tran@cavium.com>
+Reviewed-by: Ewan D. Milne <emilne@redhat.com>
+Signed-off-by: Himanshu Madhani <hmadhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_init.c | 18 ++++--------------
+ drivers/scsi/qla2xxx/qla_target.c | 3 ++-
+ 2 files changed, 6 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 41e5358d3739..ae28586c8ef2 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -2017,25 +2017,15 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
+ cid.b.rsvd_1 = 0;
+
+ ql_dbg(ql_dbg_disc, vha, 0x20ec,
+- "%s %d %8phC LoopID 0x%x in use post gnl\n",
++ "%s %d %8phC lid %#x in use with pid %06x post gnl\n",
+ __func__, __LINE__, ea->fcport->port_name,
+- ea->fcport->loop_id);
++ ea->fcport->loop_id, cid.b24);
+
+- if (IS_SW_RESV_ADDR(cid)) {
+- set_bit(ea->fcport->loop_id, vha->hw->loop_id_map);
+- ea->fcport->loop_id = FC_NO_LOOP_ID;
+- } else {
+- qla2x00_clear_loop_id(ea->fcport);
+- }
++ set_bit(ea->fcport->loop_id, vha->hw->loop_id_map);
++ ea->fcport->loop_id = FC_NO_LOOP_ID;
+ qla24xx_post_gnl_work(vha, ea->fcport);
+ break;
+ case MBS_PORT_ID_USED:
+- ql_dbg(ql_dbg_disc, vha, 0x20ed,
+- "%s %d %8phC NPortId %02x%02x%02x inuse post gidpn\n",
+- __func__, __LINE__, ea->fcport->port_name,
+- ea->fcport->d_id.b.domain, ea->fcport->d_id.b.area,
+- ea->fcport->d_id.b.al_pa);
+-
+ lid = ea->iop[1] & 0xffff;
+ qlt_find_sess_invalidate_other(vha,
+ wwn_to_u64(ea->fcport->port_name),
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index a69ec4519d81..3015f1bbcf1a 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -1273,7 +1273,8 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess)
+ qla24xx_chk_fcp_state(sess);
+
+ ql_dbg(ql_dbg_tgt, sess->vha, 0xe001,
+- "Scheduling sess %p for deletion\n", sess);
++ "Scheduling sess %p for deletion %8phC\n",
++ sess, sess->port_name);
+
+ INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn);
+ WARN_ON(!queue_work(sess->vha->hw->wq, &sess->del_work));
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 4be7a21287..109f4df8c6 100644
--- a/series.conf
+++ b/series.conf
@@ -17924,6 +17924,7 @@
patches.fixes/scsi-qla2xxx-Fix-NVMe-session-hang-on-unload.patch
patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch
patches.fixes/scsi-qla2xxx-Fix-duplicate-switch-database-entries.patch
+ patches.fixes/scsi-qla2xxx-Fix-re-using-LoopID-when-handle-is-in-u.patch
# git://git.infradead.org/nvme.git nvme-4.20
patches.fixes/nvme_fc-add-nvme_discovery-sysfs-attribute-to-fc-tra.patch