Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f181137f9d70dc851dcb418cdad4df7888a0bfd3
Commit:     f181137f9d70dc851dcb418cdad4df7888a0bfd3
Parent:     c27e672172def41924ea8410398554c49c17b3c1
Author:     Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 11 20:26:31 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jun 12 18:58:58 2007 -0400

    myri10ge: limit the number of recoveries
    
    Limit the number of recoveries from a NIC hw watchdog reset to 1 by default.
    It enables detection of defective NICs immediately since these memory parity
    errors are expected to happen very rarely (less than once per century*NIC).
    
    Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index b53b7ad..4867837 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -279,6 +279,8 @@ static int myri10ge_fill_thresh = 256;
 module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n");
 
+static int myri10ge_reset_recover = 1;
+
 static int myri10ge_wcfifo = 0;
 module_param(myri10ge_wcfifo, int, S_IRUGO);
 MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n");
@@ -2730,8 +2732,14 @@ static void myri10ge_watchdog(struct work_struct *work)
                 * For now, just report it */
                reboot = myri10ge_read_reboot(mgp);
                printk(KERN_ERR
-                      "myri10ge: %s: NIC rebooted (0x%x), resetting\n",
-                      mgp->dev->name, reboot);
+                      "myri10ge: %s: NIC rebooted (0x%x),%s resetting\n",
+                      mgp->dev->name, reboot,
+                      myri10ge_reset_recover ? " " : " not");
+               if (myri10ge_reset_recover == 0)
+                       return;
+
+               myri10ge_reset_recover--;
+
                /*
                 * A rebooted nic will come back with config space as
                 * it was after power was applied to PCIe bus.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to