aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_driver.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-04-17 00:09:30 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:30 -0400
commit9b436eb4f8ec39238582d4fe11b7d20e9ae3c45b (patch)
tree20e1d881181d110ee7dcef035fb54160f5b4eb83 /drivers/infiniband/hw/ipath/ipath_driver.c
parent1d7c2e529fb6d4143d294ade7d99e29cb6b3775f (diff)
IB/ipath: Fix check for no interrupts to reliably fallback to INTx
Newer HCAs support MSI interrupts and also INTx interrupts. Fix the code so that INTx can be reliably enabled if MSI interrupts are not working. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_driver.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 1245180f210..a3141bbc177 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -138,19 +138,6 @@ static struct pci_driver ipath_driver = {
138 }, 138 },
139}; 139};
140 140
141static void ipath_check_status(struct work_struct *work)
142{
143 struct ipath_devdata *dd = container_of(work, struct ipath_devdata,
144 status_work.work);
145
146 /*
147 * If we don't have any interrupts, let the user know and
148 * don't bother checking again.
149 */
150 if (dd->ipath_int_counter == 0)
151 dev_err(&dd->pcidev->dev, "No interrupts detected.\n");
152}
153
154static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev, 141static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev,
155 u32 *bar0, u32 *bar1) 142 u32 *bar0, u32 *bar1)
156{ 143{
@@ -218,8 +205,6 @@ static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev)
218 dd->pcidev = pdev; 205 dd->pcidev = pdev;
219 pci_set_drvdata(pdev, dd); 206 pci_set_drvdata(pdev, dd);
220 207
221 INIT_DELAYED_WORK(&dd->status_work, ipath_check_status);
222
223 list_add(&dd->ipath_list, &ipath_dev_list); 208 list_add(&dd->ipath_list, &ipath_dev_list);
224 209
225bail_unlock: 210bail_unlock:
@@ -620,9 +605,6 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
620 ipath_diag_add(dd); 605 ipath_diag_add(dd);
621 ipath_register_ib_device(dd); 606 ipath_register_ib_device(dd);
622 607
623 /* Check that card status in STATUS_TIMEOUT seconds. */
624 schedule_delayed_work(&dd->status_work, HZ * STATUS_TIMEOUT);
625
626 goto bail; 608 goto bail;
627 609
628bail_irqsetup: 610bail_irqsetup:
@@ -753,7 +735,6 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev)
753 */ 735 */
754 ipath_shutdown_device(dd); 736 ipath_shutdown_device(dd);
755 737
756 cancel_delayed_work(&dd->status_work);
757 flush_scheduled_work(); 738 flush_scheduled_work();
758 739
759 if (dd->verbs_dev) 740 if (dd->verbs_dev)
@@ -2195,6 +2176,10 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
2195 del_timer_sync(&dd->ipath_stats_timer); 2176 del_timer_sync(&dd->ipath_stats_timer);
2196 dd->ipath_stats_timer_active = 0; 2177 dd->ipath_stats_timer_active = 0;
2197 } 2178 }
2179 if (dd->ipath_intrchk_timer.data) {
2180 del_timer_sync(&dd->ipath_intrchk_timer);
2181 dd->ipath_intrchk_timer.data = 0;
2182 }
2198 2183
2199 /* 2184 /*
2200 * clear all interrupts and errors, so that the next time the driver 2185 * clear all interrupts and errors, so that the next time the driver