From: Brice Goglin Date: Sun, 30 Jul 2006 04:14:15 +0000 (-0400) Subject: [PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler X-Git-Tag: v2.6.18-rc4~47^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c54772e751c0262073e85a7aa87f093fc0dd44f1;p=platform%2Fkernel%2Flinux-3.10.git [PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler Fix spurious invocations of the watchdog reset handler. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 198c6f0..06440a8 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -177,6 +177,7 @@ struct myri10ge_priv { struct work_struct watchdog_work; struct timer_list watchdog_timer; int watchdog_tx_done; + int watchdog_tx_req; int watchdog_resets; int tx_linearized; int pause; @@ -2542,7 +2543,8 @@ static void myri10ge_watchdog_timer(unsigned long arg) mgp = (struct myri10ge_priv *)arg; if (mgp->tx.req != mgp->tx.done && - mgp->tx.done == mgp->watchdog_tx_done) + mgp->tx.done == mgp->watchdog_tx_done && + mgp->watchdog_tx_req != mgp->watchdog_tx_done) /* nic seems like it might be stuck.. */ schedule_work(&mgp->watchdog_work); else @@ -2551,6 +2553,7 @@ static void myri10ge_watchdog_timer(unsigned long arg) jiffies + myri10ge_watchdog_timeout * HZ); mgp->watchdog_tx_done = mgp->tx.done; + mgp->watchdog_tx_req = mgp->tx.req; } static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)