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

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: default avatarBrice Goglin <brice@myri.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent c27e6721
...@@ -279,6 +279,8 @@ static int myri10ge_fill_thresh = 256; ...@@ -279,6 +279,8 @@ static int myri10ge_fill_thresh = 256;
module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n"); MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n");
static int myri10ge_reset_recover = 1;
static int myri10ge_wcfifo = 0; static int myri10ge_wcfifo = 0;
module_param(myri10ge_wcfifo, int, S_IRUGO); module_param(myri10ge_wcfifo, int, S_IRUGO);
MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n"); 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) ...@@ -2730,8 +2732,14 @@ static void myri10ge_watchdog(struct work_struct *work)
* For now, just report it */ * For now, just report it */
reboot = myri10ge_read_reboot(mgp); reboot = myri10ge_read_reboot(mgp);
printk(KERN_ERR printk(KERN_ERR
"myri10ge: %s: NIC rebooted (0x%x), resetting\n", "myri10ge: %s: NIC rebooted (0x%x),%s resetting\n",
mgp->dev->name, reboot); 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 * A rebooted nic will come back with config space as
* it was after power was applied to PCIe bus. * it was after power was applied to PCIe bus.
......
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