diff options
author | Prakash, Sathya <sathya.prakash@lsi.com> | 2008-03-07 05:23:21 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:15:43 -0400 |
commit | 23a274c8a5adafc74a66f16988776fc7dd6f6e51 (patch) | |
tree | 9cae17ade000db17efeee4587bc6ab65632302ea /drivers/message/fusion/mptbase.c | |
parent | 74b2e047ecda7a82c3327a0d0bb45ee2ccf301ca (diff) |
[SCSI] mpt fusion: Enable MSI by default for SAS controllers
This patch modifies the driver to enable MSI by default for all SAS chips.
Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index c6be6eba7dc3..6ee5876d0524 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -79,7 +79,7 @@ MODULE_VERSION(my_VERSION); | |||
79 | /* | 79 | /* |
80 | * cmd line parameters | 80 | * cmd line parameters |
81 | */ | 81 | */ |
82 | static int mpt_msi_enable; | 82 | static int mpt_msi_enable = -1; |
83 | module_param(mpt_msi_enable, int, 0); | 83 | module_param(mpt_msi_enable, int, 0); |
84 | MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); | 84 | MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); |
85 | 85 | ||
@@ -1686,6 +1686,11 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1686 | ioc->bus_type = SAS; | 1686 | ioc->bus_type = SAS; |
1687 | } | 1687 | } |
1688 | 1688 | ||
1689 | if (ioc->bus_type == SAS && mpt_msi_enable == -1) | ||
1690 | ioc->msi_enable = 1; | ||
1691 | else | ||
1692 | ioc->msi_enable = mpt_msi_enable; | ||
1693 | |||
1689 | if (ioc->errata_flag_1064) | 1694 | if (ioc->errata_flag_1064) |
1690 | pci_disable_io_access(pdev); | 1695 | pci_disable_io_access(pdev); |
1691 | 1696 | ||
@@ -2057,15 +2062,17 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
2057 | if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) { | 2062 | if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) { |
2058 | ioc->pci_irq = -1; | 2063 | ioc->pci_irq = -1; |
2059 | if (ioc->pcidev->irq) { | 2064 | if (ioc->pcidev->irq) { |
2060 | if (mpt_msi_enable && !pci_enable_msi(ioc->pcidev)) | 2065 | if (ioc->msi_enable && !pci_enable_msi(ioc->pcidev)) |
2061 | printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", | 2066 | printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", |
2062 | ioc->name); | 2067 | ioc->name); |
2068 | else | ||
2069 | ioc->msi_enable = 0; | ||
2063 | rc = request_irq(ioc->pcidev->irq, mpt_interrupt, | 2070 | rc = request_irq(ioc->pcidev->irq, mpt_interrupt, |
2064 | IRQF_SHARED, ioc->name, ioc); | 2071 | IRQF_SHARED, ioc->name, ioc); |
2065 | if (rc < 0) { | 2072 | if (rc < 0) { |
2066 | printk(MYIOC_s_ERR_FMT "Unable to allocate " | 2073 | printk(MYIOC_s_ERR_FMT "Unable to allocate " |
2067 | "interrupt %d!\n", ioc->name, ioc->pcidev->irq); | 2074 | "interrupt %d!\n", ioc->name, ioc->pcidev->irq); |
2068 | if (mpt_msi_enable) | 2075 | if (ioc->msi_enable) |
2069 | pci_disable_msi(ioc->pcidev); | 2076 | pci_disable_msi(ioc->pcidev); |
2070 | return -EBUSY; | 2077 | return -EBUSY; |
2071 | } | 2078 | } |
@@ -2261,7 +2268,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
2261 | out: | 2268 | out: |
2262 | if ((ret != 0) && irq_allocated) { | 2269 | if ((ret != 0) && irq_allocated) { |
2263 | free_irq(ioc->pci_irq, ioc); | 2270 | free_irq(ioc->pci_irq, ioc); |
2264 | if (mpt_msi_enable) | 2271 | if (ioc->msi_enable) |
2265 | pci_disable_msi(ioc->pcidev); | 2272 | pci_disable_msi(ioc->pcidev); |
2266 | } | 2273 | } |
2267 | return ret; | 2274 | return ret; |
@@ -2443,7 +2450,7 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc) | |||
2443 | 2450 | ||
2444 | if (ioc->pci_irq != -1) { | 2451 | if (ioc->pci_irq != -1) { |
2445 | free_irq(ioc->pci_irq, ioc); | 2452 | free_irq(ioc->pci_irq, ioc); |
2446 | if (mpt_msi_enable) | 2453 | if (ioc->msi_enable) |
2447 | pci_disable_msi(ioc->pcidev); | 2454 | pci_disable_msi(ioc->pcidev); |
2448 | ioc->pci_irq = -1; | 2455 | ioc->pci_irq = -1; |
2449 | } | 2456 | } |