netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: linux <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Matt Mackall <mpm@selenic.com>,
	netdev@oss.sgi.com, Michael Buesch <mbuesch@freenet.de>
Subject: [PATCH 1/1] net: Netconsole poll support for 3c509
Date: Tue, 23 Nov 2004 19:31:33 +1100	[thread overview]
Message-ID: <41A2F565.6050002@kolivas.org> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 204 bytes --]

This patch provides poll support to allow netconsole to work with 3c509 
network cards.

Status: Compiled, debugged and tested working by Michael Buesch.

Signed-off-by: Con Kolivas <kernel@kolivas.org>


[-- Attachment #1.2: net_3c509_poll.diff --]
[-- Type: text/x-patch, Size: 1308 bytes --]

diff -urNX /home/mb/dontdiff linux-2.6.10-rc2-mm2.orig/drivers/net/3c509.c linux-2.6.10-rc2-mm2/drivers/net/3c509.c
--- linux-2.6.10-rc2-mm2.orig/drivers/net/3c509.c	2004-11-21 15:10:18.799455108 +0100
+++ linux-2.6.10-rc2-mm2/drivers/net/3c509.c	2004-11-21 15:12:01.677918665 +0100
@@ -209,6 +209,9 @@
 #if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 static int el3_device_remove (struct device *device);
 #endif
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void el3_poll_controller(struct net_device *dev);
+#endif
 
 #ifdef CONFIG_EISA
 struct eisa_device_id el3_eisa_ids[] = {
@@ -321,6 +324,9 @@
 	dev->set_multicast_list = &set_multicast_list;
 	dev->tx_timeout = el3_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = el3_poll_controller;
+#endif
 	SET_ETHTOOL_OPS(dev, &ethtool_ops);
 
 	err = register_netdev(dev);
@@ -999,6 +1005,19 @@
 }
 
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void el3_poll_controller(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	el3_interrupt(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
+
 static struct net_device_stats *
 el3_get_stats(struct net_device *dev)
 {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

             reply	other threads:[~2004-11-23  8:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23  8:31 Con Kolivas [this message]
2004-11-23 20:43 ` [PATCH 1/1] net: Netconsole poll support for 3c509 Matt Mackall

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=41A2F565.6050002@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbuesch@freenet.de \
    --cc=mpm@selenic.com \
    --cc=netdev@oss.sgi.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 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).