[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>

authored by Brice Goglin and committed by Jeff Garzik c54772e7 e454358a

+4 -1
+4 -1
drivers/net/myri10ge/myri10ge.c
··· 177 177 struct work_struct watchdog_work; 178 178 struct timer_list watchdog_timer; 179 179 int watchdog_tx_done; 180 + int watchdog_tx_req; 180 181 int watchdog_resets; 181 182 int tx_linearized; 182 183 int pause; ··· 2543 2542 2544 2543 mgp = (struct myri10ge_priv *)arg; 2545 2544 if (mgp->tx.req != mgp->tx.done && 2546 - mgp->tx.done == mgp->watchdog_tx_done) 2545 + mgp->tx.done == mgp->watchdog_tx_done && 2546 + mgp->watchdog_tx_req != mgp->watchdog_tx_done) 2547 2547 /* nic seems like it might be stuck.. */ 2548 2548 schedule_work(&mgp->watchdog_work); 2549 2549 else ··· 2553 2551 jiffies + myri10ge_watchdog_timeout * HZ); 2554 2552 2555 2553 mgp->watchdog_tx_done = mgp->tx.done; 2554 + mgp->watchdog_tx_req = mgp->tx.req; 2556 2555 } 2557 2556 2558 2557 static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)