Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3569

kernel-2.6.18-194.11.1.el5.src.rpm

From: Marcus Barrow <mbarrow@redhat.com>
Date: Wed, 12 Nov 2008 14:25:08 -0500
Subject: [scsi] qla2xxx: no NPIV for loop connections
Message-id: 20081112192508.18119.70505.sendpatchset@file.bos.redhat.com
O-Subject: [rhel 5.3 bug] qla2xxx - No NPIV for Loop connections.
Bugzilla: 471269
RH-Acked-by: Tomas Henzl <thenzl@redhat.com>

BZ 471269 - [QLogic 5.3 bug] qla2xxx - No NPIV for Loop connections.

FIbre channel does not support NPIV, virtual nports, for arbitrated loop
connections, only for point to point connections.

This simple patch sets the value for maximum virtual ports to an acceptable
value for the firmware.

This patch applies and builds cleanly with 2.6.18-122 and is observed to fix
this problem on the NEC machine that reported it and also in testing at QLogic
labs.

It is not, but will be submitted upstream.

Comments from patch queued for upstream:
Use correct value for max vport in LOOP topology.

Use minimum value for max vport during firmware initialization in LOOP
topology. Using max vport value from get resource count in LOOP
topology causes firmware initialization failure.

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 0f7a6da..a645dda 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1188,8 +1188,11 @@ qla2x00_init_rings(scsi_qla_host_t *ha)
 
 	DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));
 
-	if (ha->flags.npiv_supported)
+	if (ha->flags.npiv_supported) {
+		if (ha->operating_mode == LOOP)
+			ha->max_npiv_vports = MIN_MULTI_ID_FABRIC - 1;
 		mid_init_cb->count = cpu_to_le16(ha->max_npiv_vports);	
+	}
 
 	mid_init_cb->options = __constant_cpu_to_le16(BIT_1);
 
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index 37956e0..8df91ff 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.02.00.04.05.03-k"
+#define QLA2XXX_VERSION      "8.02.00.05.05.03-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	1