diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-04-21 21:19:15 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-21 21:19:15 -0400 |
commit | 44957572cc198f6fcee9569813722b9ae1bd1679 (patch) | |
tree | 7b8b1a739912fe05f5a7d5281a84e07a680c06be /drivers | |
parent | 480f58e6143135680fc1e61ea2dedc72cf3d1f95 (diff) |
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: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba7220.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba7220.c b/drivers/infiniband/hw/ipath/ipath_iba7220.c index 1b2de2cfb69b..633a605e69db 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba7220.c +++ b/drivers/infiniband/hw/ipath/ipath_iba7220.c | |||
@@ -1221,7 +1221,7 @@ static int ipath_msi_enabled(struct pci_dev *pdev) | |||
1221 | static void ipath_7220_nomsi(struct ipath_devdata *dd) | 1221 | static void ipath_7220_nomsi(struct ipath_devdata *dd) |
1222 | { | 1222 | { |
1223 | dd->ipath_msi_lo = 0; | 1223 | dd->ipath_msi_lo = 0; |
1224 | #ifdef CONFIG_PCI_MSI | 1224 | |
1225 | if (ipath_msi_enabled(dd->pcidev)) { | 1225 | if (ipath_msi_enabled(dd->pcidev)) { |
1226 | /* | 1226 | /* |
1227 | * free, but don't zero; later kernels require | 1227 | * free, but don't zero; later kernels require |
@@ -1232,7 +1232,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd) | |||
1232 | free_irq(dd->ipath_irq, dd); | 1232 | free_irq(dd->ipath_irq, dd); |
1233 | pci_disable_msi(dd->pcidev); | 1233 | pci_disable_msi(dd->pcidev); |
1234 | } | 1234 | } |
1235 | #endif | ||
1236 | } | 1235 | } |
1237 | 1236 | ||
1238 | /* | 1237 | /* |
@@ -1344,7 +1343,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, | |||
1344 | u32 boardrev; | 1343 | u32 boardrev; |
1345 | 1344 | ||
1346 | dd->ipath_msi_lo = 0; /* used as a flag during reset processing */ | 1345 | dd->ipath_msi_lo = 0; /* used as a flag during reset processing */ |
1347 | #ifdef CONFIG_PCI_MSI | 1346 | |
1348 | pos = pci_find_capability(pdev, PCI_CAP_ID_MSI); | 1347 | pos = pci_find_capability(pdev, PCI_CAP_ID_MSI); |
1349 | if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto")) | 1348 | if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto")) |
1350 | ret = pci_enable_msi(pdev); | 1349 | ret = pci_enable_msi(pdev); |
@@ -1377,10 +1376,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, | |||
1377 | } else | 1376 | } else |
1378 | ipath_dev_err(dd, "Can't find MSI capability, " | 1377 | ipath_dev_err(dd, "Can't find MSI capability, " |
1379 | "can't save MSI settings for reset\n"); | 1378 | "can't save MSI settings for reset\n"); |
1380 | #else | ||
1381 | ipath_dbg("PCI_MSI not configured, using IntX interrupts\n"); | ||
1382 | ipath_enable_intx(pdev); | ||
1383 | #endif | ||
1384 | 1379 | ||
1385 | dd->ipath_irq = pdev->irq; | 1380 | dd->ipath_irq = pdev->irq; |
1386 | 1381 | ||
@@ -1583,7 +1578,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd) | |||
1583 | static int ipath_reinit_msi(struct ipath_devdata *dd) | 1578 | static int ipath_reinit_msi(struct ipath_devdata *dd) |
1584 | { | 1579 | { |
1585 | int ret = 0; | 1580 | int ret = 0; |
1586 | #ifdef CONFIG_PCI_MSI | 1581 | |
1587 | int pos; | 1582 | int pos; |
1588 | u16 control; | 1583 | u16 control; |
1589 | if (!dd->ipath_msi_lo) /* Using intX, or init problem */ | 1584 | if (!dd->ipath_msi_lo) /* Using intX, or init problem */ |
@@ -1617,8 +1612,8 @@ static int ipath_reinit_msi(struct ipath_devdata *dd) | |||
1617 | ((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8), | 1612 | ((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8), |
1618 | dd->ipath_msi_data); | 1613 | dd->ipath_msi_data); |
1619 | ret = 1; | 1614 | ret = 1; |
1615 | |||
1620 | bail: | 1616 | bail: |
1621 | #endif | ||
1622 | if (!ret) { | 1617 | if (!ret) { |
1623 | ipath_dbg("Using IntX, MSI disabled or not configured\n"); | 1618 | ipath_dbg("Using IntX, MSI disabled or not configured\n"); |
1624 | ipath_enable_intx(dd->pcidev); | 1619 | ipath_enable_intx(dd->pcidev); |