From: Jan Ceuleers <jan.ceuleers@computer.org>
To: netdev@vger.kernel.org
Cc: "David Miller" <davem@davemloft.net>,
"Stéphane Berthelot" <sberthelot@emisfr.com>
Subject: [PATCH] via-velocity: add netpoll functionality for the benefit of netconsole
Date: Mon, 04 Jan 2010 19:32:32 +0100 [thread overview]
Message-ID: <4B423440.6060807@computer.org> (raw)
In February 2008, Stéphane Bertelot submitted a patch to netdev adding
netpoll functionality to the via-velocity driver so that netconsole
could be used with it.
There was no discussion at the time and the patch was not committed to
mainline.
I'd like to try again with this version, which has been ported to the
current code base.
---------------------
This patch is a port to net-next-2.6 of a submission by Stéphane
Bertelot in February 2008.
Signed-off-by: Stéphane Berthelot <sberthelot@emisfr.com>
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
---
drivers/net/via-velocity.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 4ceb441..90718f5 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2216,6 +2216,20 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance)
}
/**
+ * velocity_poll_controller - netpoll controller
+ * @dev: network device
+ *
+ * Used by netconsole and other diagnostic tools to allow network
+ * i/o with interrupts disabled.
+ */
+static void velocity_poll_controller(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ velocity_intr(dev->irq, dev);
+ enable_irq(dev->irq);
+}
+
+/**
* velocity_open - interface activation callback
* @dev: network layer device to open
*
@@ -2628,6 +2642,9 @@ static const struct net_device_ops velocity_netdev_ops = {
.ndo_vlan_rx_add_vid = velocity_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = velocity_vlan_rx_kill_vid,
.ndo_vlan_rx_register = velocity_vlan_rx_register,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = velocity_poll_controller,
+#endif
};
/**
--
1.6.3.3
next reply other threads:[~2010-01-04 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 18:32 Jan Ceuleers [this message]
2010-01-05 6:28 ` [PATCH] via-velocity: add netpoll functionality for the benefit of netconsole Simon Kagstrom
2010-01-05 20:19 ` Jan Ceuleers
2010-01-07 6:26 ` Simon Kagstrom
2010-01-10 9:06 ` Jan Ceuleers
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=4B423440.6060807@computer.org \
--to=jan.ceuleers@computer.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sberthelot@emisfr.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.