Commit c54772e7 authored by Brice Goglin's avatar Brice Goglin Committed by Jeff Garzik

[PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler

Fix spurious invocations of the watchdog reset handler.
Signed-off-by: default avatarBrice Goglin <brice@myri.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent e454358a
...@@ -177,6 +177,7 @@ struct myri10ge_priv { ...@@ -177,6 +177,7 @@ struct myri10ge_priv {
struct work_struct watchdog_work; struct work_struct watchdog_work;
struct timer_list watchdog_timer; struct timer_list watchdog_timer;
int watchdog_tx_done; int watchdog_tx_done;
int watchdog_tx_req;
int watchdog_resets; int watchdog_resets;
int tx_linearized; int tx_linearized;
int pause; int pause;
...@@ -2542,7 +2543,8 @@ static void myri10ge_watchdog_timer(unsigned long arg) ...@@ -2542,7 +2543,8 @@ static void myri10ge_watchdog_timer(unsigned long arg)
mgp = (struct myri10ge_priv *)arg; mgp = (struct myri10ge_priv *)arg;
if (mgp->tx.req != mgp->tx.done && 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.. */ /* nic seems like it might be stuck.. */
schedule_work(&mgp->watchdog_work); schedule_work(&mgp->watchdog_work);
else else
...@@ -2551,6 +2553,7 @@ static void myri10ge_watchdog_timer(unsigned long arg) ...@@ -2551,6 +2553,7 @@ static void myri10ge_watchdog_timer(unsigned long arg)
jiffies + myri10ge_watchdog_timeout * HZ); jiffies + myri10ge_watchdog_timeout * HZ);
mgp->watchdog_tx_done = mgp->tx.done; 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) static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment