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:40 +0200
commitba7815c3bbac90608a18cf984a8131e07b1b3160 (patch)
tree8032eca95ce115fe5ff80f0db1afa3cb76089d68
parent839e1218c8de28ec97c4ae006b6eb78c437b5064 (diff)
scsi: qla2xxx: Fix NVMe Target discovery (bsc#1108870).
-rw-r--r--patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch46
-rw-r--r--series.conf1
2 files changed, 47 insertions, 0 deletions
diff --git a/patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch b/patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch
new file mode 100644
index 0000000000..d1df244866
--- /dev/null
+++ b/patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch
@@ -0,0 +1,46 @@
+From: Quinn Tran <quinn.tran@cavium.com>
+Date: Wed, 26 Sep 2018 22:05:12 -0700
+Subject: [PATCH] scsi: qla2xxx: Fix NVMe Target discovery
+Git-commit: db186382af21e926e90df19499475f2552192b77
+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 when remoteport registers itself as both FCP and
+FC-NVMe with the switch, driver will pick FC-NVMe personality as default when
+scanning for targets.
+
+Driver was using comaprative operator instead of bitwise operator to check for
+fc4_type for both FCP and FC-NVME.
+
+Fixes: 2b5b96473efc ("scsi: qla2xxx: Fix FC-NVMe LUN discovery")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
+Reviewed-by: Ewan D. Milne <emilne@redhat.com>
+Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 429033ab6897..dba672f87cb2 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -4880,10 +4880,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
+ fcport->d_id = e->u.new_sess.id;
+ fcport->flags |= FCF_FABRIC_DEVICE;
+ fcport->fw_login_state = DSC_LS_PLOGI_PEND;
+- if (e->u.new_sess.fc4_type == FS_FC4TYPE_FCP)
++ if (e->u.new_sess.fc4_type & FS_FC4TYPE_FCP)
+ fcport->fc4_type = FC4_TYPE_FCP_SCSI;
+
+- if (e->u.new_sess.fc4_type == FS_FC4TYPE_NVME) {
++ if (e->u.new_sess.fc4_type & FS_FC4TYPE_NVME) {
+ fcport->fc4_type = FC4_TYPE_OTHER;
+ fcport->fc4f_nvme = FC4_TYPE_NVME;
+ }
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index ed3d37e7c7..579108e674 100644
--- a/series.conf
+++ b/series.conf
@@ -17922,6 +17922,7 @@
# mkp/scsi 4.20/scsi-queue
patches.fixes/scsi-qla2xxx-don-t-allow-negative-thresholds.patch
patches.fixes/scsi-qla2xxx-Fix-NVMe-session-hang-on-unload.patch
+ patches.fixes/scsi-qla2xxx-Fix-NVMe-Target-discovery.patch
# git://git.infradead.org/nvme.git nvme-4.20
patches.fixes/nvme_fc-add-nvme_discovery-sysfs-attribute-to-fc-tra.patch