From: Brice Goglin <brice@myri.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH 4/6] myri10ge: limit the number of recoveries
Date: Mon, 07 May 2007 23:51:10 +0200 [thread overview]
Message-ID: <463F9F4E.4060706@myri.com> (raw)
In-Reply-To: <463F9E9E.8000808@ens-lyon.org>
Limit the number of recoveries from a NIC hw watchdog reset to
1 by default. This is tweakable via the myri10ge_reset_recover
tunable.
Signed-off-by: Brice Goglin <brice@myri.com>
---
drivers/net/myri10ge/myri10ge.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
Index: linux-git/drivers/net/myri10ge/myri10ge.c
===================================================================
--- linux-git.orig/drivers/net/myri10ge/myri10ge.c 2007-05-07 23:21:27.000000000 +0200
+++ linux-git/drivers/net/myri10ge/myri10ge.c 2007-05-07 23:21:45.000000000 +0200
@@ -279,6 +279,11 @@
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;
+module_param(myri10ge_reset_recover, int, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(myri10ge_reset_recover,
+ "Number of recoveries allowed from NIC hw reset\n");
+
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");
@@ -2706,8 +2711,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.
next prev parent reply other threads:[~2007-05-07 21:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-07 21:48 [PATCH 0/6] myri10ge updates for 2.6.22 Brice Goglin
2007-05-07 21:49 ` [PATCH 1/6] myri10ge: support new firmware counters Brice Goglin
2007-05-08 5:16 ` Jeff Garzik
2007-05-07 21:49 ` [PATCH 2/6] myri10ge: update firmware headers Brice Goglin
2007-05-07 21:50 ` [PATCH 3/6] myri10ge: fix restoring of multicast list after reset Brice Goglin
2007-05-07 21:51 ` Brice Goglin [this message]
2007-05-08 5:13 ` [PATCH 4/6] myri10ge: limit the number of recoveries Jeff Garzik
2007-05-08 21:10 ` Brice Goglin
2007-05-07 21:51 ` [PATCH 5/6] myri10ge: move the DMA test code into its own function Brice Goglin
2007-05-07 21:52 ` [PATCH 6/6] myri10ge: replace the chipset whitelist with firmware autodetection Brice Goglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463F9F4E.4060706@myri.com \
--to=brice@myri.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).