aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ipath/ipath_iba7220.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba7220.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_iba7220.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba7220.c b/drivers/infiniband/hw/ipath/ipath_iba7220.c
index 1b2de2cfb69..e3ec0d1bdf5 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba7220.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba7220.c
@@ -1215,13 +1215,13 @@ static int ipath_msi_enabled(struct pci_dev *pdev)
/*
* disable msi interrupt if enabled, and clear the flag.
- * flag is used primarily for the fallback to IntX, but
+ * flag is used primarily for the fallback to INTx, but
* is also used in reinit after reset as a flag.
*/
static void ipath_7220_nomsi(struct ipath_devdata *dd)
{
dd->ipath_msi_lo = 0;
-#ifdef CONFIG_PCI_MSI
+
if (ipath_msi_enabled(dd->pcidev)) {
/*
* free, but don't zero; later kernels require
@@ -1232,7 +1232,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd)
free_irq(dd->ipath_irq, dd);
pci_disable_msi(dd->pcidev);
}
-#endif
}
/*
@@ -1344,7 +1343,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
u32 boardrev;
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);
if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto"))
ret = pci_enable_msi(pdev);
@@ -1377,10 +1376,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd,
} else
ipath_dev_err(dd, "Can't find MSI capability, "
"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;
@@ -1583,7 +1578,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd)
static int ipath_reinit_msi(struct ipath_devdata *dd)
{
int ret = 0;
-#ifdef CONFIG_PCI_MSI
+
int pos;
u16 control;
if (!dd->ipath_msi_lo) /* Using intX, or init problem */
@@ -1617,10 +1612,10 @@ static int ipath_reinit_msi(struct ipath_devdata *dd)
((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8),
dd->ipath_msi_data);
ret = 1;
+
bail:
-#endif
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);
ret = 1;
}
@@ -2149,12 +2144,12 @@ static void ipath_7220_read_counters(struct ipath_devdata *dd,
counters[i] = ipath_snap_cntr(dd, i);
}
-/* if we are using MSI, try to fallback to IntX */
+/* if we are using MSI, try to fallback to INTx */
static int ipath_7220_intr_fallback(struct ipath_devdata *dd)
{
if (dd->ipath_msi_lo) {
dev_info(&dd->pcidev->dev, "MSI interrupt not detected,"
- " trying IntX interrupts\n");
+ " trying INTx interrupts\n");
ipath_7220_nomsi(dd);
ipath_enable_intx(dd->pcidev);
/*
@@ -2167,7 +2162,7 @@ static int ipath_7220_intr_fallback(struct ipath_devdata *dd)
if (request_irq(dd->ipath_irq, ipath_intr, IRQF_SHARED,
IPATH_DRV_NAME, dd))
ipath_dev_err(dd,
- "Could not re-request_irq for IntX\n");
+ "Could not re-request_irq for INTx\n");
return 1;
}
return 0;