Sophie

Sophie

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

kernel-2.6.18-194.11.1.el5.src.rpm

From: AMEET M. PARANJAPE <aparanja@redhat.com>
Date: Wed, 28 Jan 2009 13:44:42 -0500
Subject: [scsi] ipr: enhance driver to support MSI-X interrupt
Message-id: 20090128184324.5602.90351.sendpatchset@squad5-lp1.lab.bos.redhat.com
O-Subject: [PATCH RHEL5.4 BZ475717] Enhance the ipr driver to support MSI-X interrupt
Bugzilla: 475717
RH-Acked-by: David Howells <dhowells@redhat.com>
RH-Acked-by: John Feeney <jfeeney@redhat.com>

RHBZ#:
======
https://bugzilla.redhat.com/show_bug.cgi?id=475717

Description:
===========
The ipr driver needs to enable the MSI or MSI-X interrupt support for all
PCI-Express SAS adapters.

RHEL Version Found:
================
RHEL 5.3

kABI Status:
============
No symbols were harmed.

Brew:
=====
Built on all platforms.
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1664343

Upstream Status:
================
http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=c76fd3630b3a7cddd3df930dbad0ba2c43f2ae1f

Test Status:
============
Tested using 2 PCI-X adapters and 2 PCI-E adapters.  PCI-X adapters correctly
reported MSI not enabled. PCI-E adapters correctly reported MSI enabled.

With storage connected to the PCI-E adapters in a dual adapter configuration,
ran disk stress test on 4 arrays (one each of RAID 0, RAID 10, RAID 5 and RAID
6) and switched the primary adapter.  The switch occurred without error and the
stress tests continued to run without errors.

Performed a format of a JBOD disk to an advanced function disk with no errors.

Performed 4 iterations of rmmod and insmod of the ipr module.  Gave debug=1 for
the insmod and observed the correct reporting of MSI enabled or not enabled.
===============================================================
Ameet Paranjape 978-392-3903 ext 23903
IBM on-site partner

Proposed Patch:
===============

diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index ced700c..803e654 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -7196,6 +7196,7 @@ static void ipr_free_all_resources(struct ipr_ioa_cfg *ioa_cfg)
 
 	ENTER;
 	free_irq(pdev->irq, ioa_cfg);
+	pci_disable_msi(pdev);
 	iounmap(ioa_cfg->hdw_dma_regs);
 	pci_release_regions(pdev);
 	ipr_free_mem(ioa_cfg);
@@ -7481,6 +7482,11 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
 		goto out;
 	}
 
+	if (!(rc = pci_enable_msi(pdev)))
+		dev_info(&pdev->dev, "MSI enabled\n");
+	else if (ipr_debug)
+		dev_info(&pdev->dev, "Cannot enable MSI\n");
+
 	dev_info(&pdev->dev, "Found IOA with IRQ: %d\n", pdev->irq);
 
 	host = scsi_host_alloc(&driver_template, sizeof(*ioa_cfg));
@@ -7635,6 +7641,7 @@ out_release_regions:
 out_scsi_host_put:
 	scsi_host_put(host);
 out_disable:
+	pci_disable_msi(pdev);
 	pci_disable_device(pdev);
 	goto out;
 }
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index a7c245f..b7862f3 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -37,8 +37,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.2.0.2"
-#define IPR_DRIVER_DATE "(September 26, 2007)"
+#define IPR_DRIVER_VERSION "2.2.0.3"
+#define IPR_DRIVER_DATE "(January 26, 2009)"
 
 /*
  * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding