diff options
author | Brice Goglin <brice@myri.com> | 2006-07-30 00:14:15 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-03 17:31:10 -0400 |
commit | c54772e751c0262073e85a7aa87f093fc0dd44f1 (patch) | |
tree | 5b6ef64c20ac5c2027f73a59bc7a6b4b21f0b63e /drivers/net | |
parent | e454358ace657af953b5b289f49cf733973f41e4 (diff) |
[PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler
Fix spurious invocations of the watchdog reset handler.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 198c6f0e0105..06440a86baef 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -177,6 +177,7 @@ struct myri10ge_priv { | |||
177 | struct work_struct watchdog_work; | 177 | struct work_struct watchdog_work; |
178 | struct timer_list watchdog_timer; | 178 | struct timer_list watchdog_timer; |
179 | int watchdog_tx_done; | 179 | int watchdog_tx_done; |
180 | int watchdog_tx_req; | ||
180 | int watchdog_resets; | 181 | int watchdog_resets; |
181 | int tx_linearized; | 182 | int tx_linearized; |
182 | int pause; | 183 | int pause; |
@@ -2542,7 +2543,8 @@ static void myri10ge_watchdog_timer(unsigned long arg) | |||
2542 | 2543 | ||
2543 | mgp = (struct myri10ge_priv *)arg; | 2544 | mgp = (struct myri10ge_priv *)arg; |
2544 | if (mgp->tx.req != mgp->tx.done && | 2545 | if (mgp->tx.req != mgp->tx.done && |
2545 | mgp->tx.done == mgp->watchdog_tx_done) | 2546 | mgp->tx.done == mgp->watchdog_tx_done && |
2547 | mgp->watchdog_tx_req != mgp->watchdog_tx_done) | ||
2546 | /* nic seems like it might be stuck.. */ | 2548 | /* nic seems like it might be stuck.. */ |
2547 | schedule_work(&mgp->watchdog_work); | 2549 | schedule_work(&mgp->watchdog_work); |
2548 | else | 2550 | else |
@@ -2551,6 +2553,7 @@ static void myri10ge_watchdog_timer(unsigned long arg) | |||
2551 | jiffies + myri10ge_watchdog_timeout * HZ); | 2553 | jiffies + myri10ge_watchdog_timeout * HZ); |
2552 | 2554 | ||
2553 | mgp->watchdog_tx_done = mgp->tx.done; | 2555 | mgp->watchdog_tx_done = mgp->tx.done; |
2556 | mgp->watchdog_tx_req = mgp->tx.req; | ||
2554 | } | 2557 | } |
2555 | 2558 | ||
2556 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 2559 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |