Fix spurious invocations of the watchdog reset handler.

Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: linux-mm/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-mm.orig/drivers/net/myri10ge/myri10ge.c       2006-07-27 
06:49:19.000000000 -0400
+++ linux-mm/drivers/net/myri10ge/myri10ge.c    2006-07-27 15:34:02.000000000 
-0400
@@ -177,6 +177,7 @@
        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;
@@ -2536,7 +2537,8 @@
 
        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
@@ -2545,6 +2547,7 @@
                          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)


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to