* [PATCH 1/3] myri10ge: limit the number of recoveries
2007-06-11 18:25 [PATCH 0/3] myri10ge updates Brice Goglin
@ 2007-06-11 18:26 ` Brice Goglin
2007-06-13 2:28 ` Jeff Garzik
2007-06-11 18:26 ` [PATCH 2/3] myri10ge: report when the link partner is running in Myrinet mode Brice Goglin
2007-06-11 18:27 ` [PATCH 3/3] myri10ge: update driver version Brice Goglin
2 siblings, 1 reply; 5+ messages in thread
From: Brice Goglin @ 2007-06-11 18:26 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
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 <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-05-30 20:58:22.000000000 +0200
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-06-04 19:01:54.000000000 +0200
@@ -279,6 +279,8 @@
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 @@
* 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] myri10ge: report when the link partner is running in Myrinet mode
2007-06-11 18:25 [PATCH 0/3] myri10ge updates Brice Goglin
2007-06-11 18:26 ` [PATCH 1/3] myri10ge: limit the number of recoveries Brice Goglin
@ 2007-06-11 18:26 ` Brice Goglin
2007-06-11 18:27 ` [PATCH 3/3] myri10ge: update driver version Brice Goglin
2 siblings, 0 replies; 5+ messages in thread
From: Brice Goglin @ 2007-06-11 18:26 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Since Myri-10G boards may also run in Myrinet mode instead of Ethernet,
add a message when we detect that the link partner is not running in the
right mode.
Signed-off-by: Brice Goglin <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
Index: linux-rc/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-rc.orig/drivers/net/myri10ge/myri10ge.c 2007-06-05 08:25:05.000000000 +0200
+++ linux-rc/drivers/net/myri10ge/myri10ge.c 2007-06-11 20:04:57.000000000 +0200
@@ -1156,9 +1156,11 @@
struct mcp_irq_data *stats = mgp->fw_stats;
if (unlikely(stats->stats_updated)) {
- if (mgp->link_state != stats->link_up) {
- mgp->link_state = stats->link_up;
- if (mgp->link_state) {
+ unsigned link_up = ntohl(stats->link_up);
+ if (mgp->link_state != link_up) {
+ mgp->link_state = link_up;
+
+ if (mgp->link_state == MXGEFW_LINK_UP) {
if (netif_msg_link(mgp))
printk(KERN_INFO
"myri10ge: %s: link up\n",
@@ -1168,8 +1170,11 @@
} else {
if (netif_msg_link(mgp))
printk(KERN_INFO
- "myri10ge: %s: link down\n",
- mgp->dev->name);
+ "myri10ge: %s: link %s\n",
+ mgp->dev->name,
+ (link_up == MXGEFW_LINK_MYRINET ?
+ "mismatch (Myrinet detected)" :
+ "down"));
netif_carrier_off(mgp->dev);
mgp->link_changes++;
}
^ permalink raw reply [flat|nested] 5+ messages in thread