[SCSI] ipr: add MSI support
authorWayne Boyer <wayneb@linux.vnet.ibm.com>
Fri, 23 Jan 2009 17:17:35 +0000 (09:17 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:57:58 +0000 (12:57 -0500)
Enable MSI if available/supported.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ipr.c
drivers/scsi/ipr.h

index 07829009a8bec0110ff397f34ddc8dceba65f800..3f47cd1c46e7d96a55669331290aae3fec32092a 100644 (file)
@@ -7147,6 +7147,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);
@@ -7432,6 +7433,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));
@@ -7574,6 +7580,7 @@ out_release_regions:
 out_scsi_host_put:
        scsi_host_put(host);
 out_disable:
+       pci_disable_msi(pdev);
        pci_disable_device(pdev);
        goto out;
 }
index 8f872f816fe4446514155ac2ffdcb4df222f4a64..79a3ae4fb2c7ea8ebe533b20848dc32ac2b7bc99 100644 (file)
@@ -37,8 +37,8 @@
 /*
  * Literals
  */
-#define IPR_DRIVER_VERSION "2.4.1"
-#define IPR_DRIVER_DATE "(April 24, 2007)"
+#define IPR_DRIVER_VERSION "2.4.2"
+#define IPR_DRIVER_DATE "(January 21, 2009)"
 
 /*
  * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding