forked from luck/tmp_suning_uos_patched
[SCSI] fusion: add MSI support
On Mon, Jan 16, 2006 at 06:53:24PM -0700, Moore, Eric wrote: > Adding MSI support, and command line for enabling > it. By default, the command line option has MSI disabled. mpt_msi_enable is initialized to 0 implicitly, no need to do that. Also replace if (mpt_msi_enable == 1) tests with just if (mpt_msi_enable). Updated patch below: Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
7e55147fe3
commit
4ddce14e75
@ -81,6 +81,10 @@ MODULE_LICENSE("GPL");
|
|||||||
/*
|
/*
|
||||||
* cmd line parameters
|
* cmd line parameters
|
||||||
*/
|
*/
|
||||||
|
static int mpt_msi_enable;
|
||||||
|
module_param(mpt_msi_enable, int, 0);
|
||||||
|
MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
|
||||||
|
|
||||||
#ifdef MFCNT
|
#ifdef MFCNT
|
||||||
static int mfcounter = 0;
|
static int mfcounter = 0;
|
||||||
#define PRINT_MF_COUNT 20000
|
#define PRINT_MF_COUNT 20000
|
||||||
@ -1444,6 +1448,9 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
|
|
||||||
ioc->pci_irq = -1;
|
ioc->pci_irq = -1;
|
||||||
if (pdev->irq) {
|
if (pdev->irq) {
|
||||||
|
if (mpt_msi_enable && !pci_enable_msi(pdev))
|
||||||
|
printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", ioc->name);
|
||||||
|
|
||||||
r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc);
|
r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc);
|
||||||
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
@ -1483,6 +1490,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
|
|
||||||
list_del(&ioc->list);
|
list_del(&ioc->list);
|
||||||
free_irq(ioc->pci_irq, ioc);
|
free_irq(ioc->pci_irq, ioc);
|
||||||
|
if (mpt_msi_enable)
|
||||||
|
pci_disable_msi(pdev);
|
||||||
iounmap(mem);
|
iounmap(mem);
|
||||||
kfree(ioc);
|
kfree(ioc);
|
||||||
pci_set_drvdata(pdev, NULL);
|
pci_set_drvdata(pdev, NULL);
|
||||||
@ -2136,6 +2145,8 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
|
|||||||
|
|
||||||
if (ioc->pci_irq != -1) {
|
if (ioc->pci_irq != -1) {
|
||||||
free_irq(ioc->pci_irq, ioc);
|
free_irq(ioc->pci_irq, ioc);
|
||||||
|
if (mpt_msi_enable)
|
||||||
|
pci_disable_msi(ioc->pcidev);
|
||||||
ioc->pci_irq = -1;
|
ioc->pci_irq = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user