Sophie

Sophie

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

kernel-2.6.18-194.11.1.el5.src.rpm

From: Marcus Barrow <mbarrow@redhat.com>
Date: Mon, 31 Aug 2009 23:48:15 -0400
Subject: [scsi] qla2xxx: allow use of MSI when MSI-X disabled
Message-id: 20090901034815.14092.46699.sendpatchset@file.bos.redhat.com
O-Subject: [rhel 5.5 bug] [V2] qla2xxx - allow use of MSI when MSI-X disabled.
Bugzilla: 517922
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

BZ 517922

Version 2 of this patch. An if statement was simplified to remove a redundant
comparision.

Currently the driver parameter to enable/disable MSI-X interrupts also treats MSI
the same way. This patch corrects this situation by allowing the user to specify
MSI-X, MSI or traditional IntA.

Being able to specify the interrupt type is important for performance and proper
operation on a variety of platforms.

This patch applies and builds cleanly with 2.6.18-162.

Tested at QLogic and IBM.

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 8240efb..a15e66f 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1986,8 +1986,14 @@ qla2x00_request_irqs(scsi_qla_host_t *ha)
 	int ret;
 
 	/* If possible, enable MSI-X. */
-	if ((!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)
-	    && !IS_QLA8001(ha)) || !ql2xenablemsix)
+	if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)
+	    && !IS_QLA8001(ha))
+		goto skip_msi;
+
+	if (ql2xenablemsix == 2)
+		goto skip_msix;
+
+	if (ql2xenablemsix != 1)
 		goto skip_msi;
 
 	if (IS_QLA2432(ha) && (ha->chip_revision < QLA_MSIX_CHIP_REV_24XX ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index e206dd7..89e5a6e 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -108,7 +108,10 @@ MODULE_PARM_DESC(ql2xqfullrampup,
 int ql2xenablemsix = 0;
 module_param(ql2xenablemsix, int, S_IRUGO|S_IRUSR);
 MODULE_PARM_DESC(ql2xenablemsix,
-                 "Set to enable MSI-X interrupt mechanism.");
+                "Set to enable MSI or MSI-X interrupt mechanism."
+                " Default is 0, enable traditional pin-based interrupt mechanism."
+                " 1 = enable MSI-X interrupt mechanism."
+                " 2 = enable MSI interrupt mechanism.");
 
 /*
  * SCSI host template entry points
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index 718ab2a..02298e1 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.03.00.10.05.04-k"
+#define QLA2XXX_VERSION      "8.03.00.1.05.05-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3