Commit 44957572 authored by Roland Dreier's avatar Roland Dreier

IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.c

The PCI MSI interface is stubbed out properly so that all the
functions just return failure if PCI_MSI=n, so there's no reason to
have "#ifdef CONFIG_PCI_MSI" blocks in ipath_iba7220.c.
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 480f58e6
...@@ -1221,7 +1221,7 @@ static int ipath_msi_enabled(struct pci_dev *pdev) ...@@ -1221,7 +1221,7 @@ static int ipath_msi_enabled(struct pci_dev *pdev)
static void ipath_7220_nomsi(struct ipath_devdata *dd) static void ipath_7220_nomsi(struct ipath_devdata *dd)
{ {
dd->ipath_msi_lo = 0; dd->ipath_msi_lo = 0;
#ifdef CONFIG_PCI_MSI
if (ipath_msi_enabled(dd->pcidev)) { if (ipath_msi_enabled(dd->pcidev)) {
/* /*
* free, but don't zero; later kernels require * free, but don't zero; later kernels require
...@@ -1232,7 +1232,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd) ...@@ -1232,7 +1232,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd)
free_irq(dd->ipath_irq, dd); free_irq(dd->ipath_irq, dd);
pci_disable_msi(dd->pcidev); pci_disable_msi(dd->pcidev);
} }
#endif
} }
/* /*
...@@ -1344,7 +1343,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, ...@@ -1344,7 +1343,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
u32 boardrev; u32 boardrev;
dd->ipath_msi_lo = 0; /* used as a flag during reset processing */ dd->ipath_msi_lo = 0; /* used as a flag during reset processing */
#ifdef CONFIG_PCI_MSI
pos = pci_find_capability(pdev, PCI_CAP_ID_MSI); pos = pci_find_capability(pdev, PCI_CAP_ID_MSI);
if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto")) if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto"))
ret = pci_enable_msi(pdev); ret = pci_enable_msi(pdev);
...@@ -1377,10 +1376,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, ...@@ -1377,10 +1376,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
} else } else
ipath_dev_err(dd, "Can't find MSI capability, " ipath_dev_err(dd, "Can't find MSI capability, "
"can't save MSI settings for reset\n"); "can't save MSI settings for reset\n");
#else
ipath_dbg("PCI_MSI not configured, using IntX interrupts\n");
ipath_enable_intx(pdev);
#endif
dd->ipath_irq = pdev->irq; dd->ipath_irq = pdev->irq;
...@@ -1583,7 +1578,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd) ...@@ -1583,7 +1578,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd)
static int ipath_reinit_msi(struct ipath_devdata *dd) static int ipath_reinit_msi(struct ipath_devdata *dd)
{ {
int ret = 0; int ret = 0;
#ifdef CONFIG_PCI_MSI
int pos; int pos;
u16 control; u16 control;
if (!dd->ipath_msi_lo) /* Using intX, or init problem */ if (!dd->ipath_msi_lo) /* Using intX, or init problem */
...@@ -1617,8 +1612,8 @@ static int ipath_reinit_msi(struct ipath_devdata *dd) ...@@ -1617,8 +1612,8 @@ static int ipath_reinit_msi(struct ipath_devdata *dd)
((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8), ((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8),
dd->ipath_msi_data); dd->ipath_msi_data);
ret = 1; ret = 1;
bail: bail:
#endif
if (!ret) { if (!ret) {
ipath_dbg("Using IntX, MSI disabled or not configured\n"); ipath_dbg("Using IntX, MSI disabled or not configured\n");
ipath_enable_intx(dd->pcidev); ipath_enable_intx(dd->pcidev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment