qla2xxx: Disable MSI/MSI-X on some chips or as selected by module parameter (Closes: #572322)

svn path=/dists/sid/linux-2.6/; revision=15317
This commit is contained in:
Ben Hutchings 2010-03-04 14:05:36 +00:00
parent 09cba2011e
commit fe30fac8d0
3 changed files with 106 additions and 0 deletions

5
debian/changelog vendored
View File

@ -21,6 +21,11 @@ linux-2.6 (2.6.32-10) UNRELEASED; urgency=low
- Add nouveau driver
- i915: Restore video overlay support (Closes: #560033)
- radeon: Enable KMS support
* qla2xxx: Disable MSI/MSI-X on some chips or as selected by module parameter
(Closes: #572322)
- MSI is disabled on QLA24xx chips other than QLA2432 (MSI-X already was)
- MSI-X is disabled if qlx2enablemsix=2
- MSI and MSI-X are disabled if qlx2enablemsix=0
-- maximilian attems <maks@debian.org> Thu, 25 Feb 2010 13:07:47 +0100

View File

@ -0,0 +1,100 @@
From: Ben Hutchings <ben@decadent.org.uk>
Subject: [PATCH] qla2xxx: Disable MSI/MSI-X on some chips or as selected by module parameter
Based on these patches applied to RHEL 5:
linux-2.6-scsi-qla2xxx-disable-msi-x-by-default.patch
linux-2.6-scsi-qla2xxx-msi-x-hardware-issues-on-platforms.patch
linux-2.6-scsi-qla2xxx-allow-use-of-msi-when-msi-x-disabled.patch
linux-2.6-scsi-qla2xxx-enable-msi-x-correctly-on-qlogic-2xxx-series.patch
The combined effect is:
- MSI is disabled on QLA24xx chips other than QLA2432 (MSI-X already was)
- MSI-X is disabled if qlx2enablemsix=2
- MSI and MSI-X are disabled if qlx2enablemsix=0
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -78,6 +78,7 @@
extern int ql2xmaxqueues;
extern int ql2xmultique_tag;
extern int ql2xfwloadbin;
+extern int ql2xenablemsix;
extern int qla2x00_loop_reset(scsi_qla_host_t *);
extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2244,19 +2244,13 @@ qla2x00_request_irqs(scsi_qla_host_t *ha)
int ret;
device_reg_t __iomem *reg = ha->iobase;
- /* If possible, enable MSI-X. */
- if (!IS_QLA2432(ha) && !IS_QLA2532(ha) &&
- !IS_QLA8432(ha) && !IS_QLA8001(ha))
- goto skip_msix;
-
- if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX ||
- !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) {
- DEBUG2(qla_printk(KERN_WARNING, ha,
- "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n",
- ha->pdev->revision, ha->fw_attributes));
+ /* If possible, enable MSI-X, MSI. */
+ if (ql2xenablemsix == 0)
+ goto skip_msi;
- goto skip_msix;
- }
+ if (!IS_QLA2432(ha) && !IS_QLA2532(ha) &&
+ !IS_QLA8432(ha) && !IS_QLA8001(ha))
+ goto skip_msi;
if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
(ha->pdev->subsystem_device == 0x7040 ||
@@ -2270,6 +2264,17 @@ qla2x00_request_irqs(scsi_qla_host_t *ha)
goto skip_msi;
}
+ if (ql2xenablemsix == 2)
+ goto skip_msix;
+
+ if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX ||
+ !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) {
+ DEBUG2(qla_printk(KERN_WARNING, ha,
+ "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n",
+ ha->pdev->revision, ha->fw_attributes));
+ goto skip_msix;
+ }
+
ret = qla24xx_enable_msix(ha, rsp);
if (!ret) {
DEBUG2(qla_printk(KERN_INFO, ha,
@@ -2281,10 +2286,6 @@ qla2x00_request_irqs(scsi_qla_host_t *ha)
"MSI-X: Falling back-to INTa mode -- %d.\n", ret);
skip_msix:
- if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) &&
- !IS_QLA8001(ha))
- goto skip_msi;
-
ret = pci_enable_msi(ha->pdev);
if (!ret) {
DEBUG2(qla_printk(KERN_INFO, ha, "MSI: Enabled.\n"));
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -121,6 +121,15 @@ MODULE_PARM_DESC(ql2xqfullrampup,
" 1 -- load firmware from flash.\n"
" 0 -- use default semantics.\n");
+int ql2xenablemsix = 1;
+module_param(ql2xenablemsix, int, S_IRUGO|S_IRUSR);
+MODULE_PARM_DESC(ql2xenablemsix,
+ "Set to enable MSI or MSI-X interrupt mechanism."
+ " Default is 1, enable MSI-X interrupt mechanism."
+ " 0 = enable traditional pin-based mechanism."
+ " 1 = enable MSI-X interrupt mechanism."
+ " 2 = enable MSI interrupt mechanism.");
+
/*
* SCSI host template entry points
*/

View File

@ -9,3 +9,4 @@
+ debian/drm-restore-private-list_sort.patch
+ features/all/i915-autoload-without-CONFIG_DRM_I915_KMS-2.patch
+ features/all/radeon-autoload-without-CONFIG_DRM_RADEON_KMS.patch
+ bugfix/all/qla2xxx-disable-broken-msi.patch