aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r--drivers/message/fusion/mptbase.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 2ef64b9ada8..e352b000c7d 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -81,6 +81,10 @@ MODULE_LICENSE("GPL");
81/* 81/*
82 * cmd line parameters 82 * cmd line parameters
83 */ 83 */
84static int mpt_msi_enable;
85module_param(mpt_msi_enable, int, 0);
86MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
87
84#ifdef MFCNT 88#ifdef MFCNT
85static int mfcounter = 0; 89static int mfcounter = 0;
86#define PRINT_MF_COUNT 20000 90#define PRINT_MF_COUNT 20000
@@ -1444,6 +1448,9 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1444 1448
1445 ioc->pci_irq = -1; 1449 ioc->pci_irq = -1;
1446 if (pdev->irq) { 1450 if (pdev->irq) {
1451 if (mpt_msi_enable && !pci_enable_msi(pdev))
1452 printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", ioc->name);
1453
1447 r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc); 1454 r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc);
1448 1455
1449 if (r < 0) { 1456 if (r < 0) {
@@ -1483,6 +1490,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1483 1490
1484 list_del(&ioc->list); 1491 list_del(&ioc->list);
1485 free_irq(ioc->pci_irq, ioc); 1492 free_irq(ioc->pci_irq, ioc);
1493 if (mpt_msi_enable)
1494 pci_disable_msi(pdev);
1486 iounmap(mem); 1495 iounmap(mem);
1487 kfree(ioc); 1496 kfree(ioc);
1488 pci_set_drvdata(pdev, NULL); 1497 pci_set_drvdata(pdev, NULL);
@@ -2136,6 +2145,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
2136 2145
2137 if (ioc->pci_irq != -1) { 2146 if (ioc->pci_irq != -1) {
2138 free_irq(ioc->pci_irq, ioc); 2147 free_irq(ioc->pci_irq, ioc);
2148 if (mpt_msi_enable)
2149 pci_disable_msi(ioc->pcidev);
2139 ioc->pci_irq = -1; 2150 ioc->pci_irq = -1;
2140 } 2151 }
2141 2152