From: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
To: Matt Mackall <mpm@selenic.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][RFC] Netconsole debugging tool for 2.6
Date: Thu, 28 Aug 2003 14:38:37 +0200 [thread overview]
Message-ID: <20030828123837.GA6933@gareth.mathematik.tu-chemnitz.de> (raw)
In-Reply-To: <20030811085508.GH31810@waste.org>
On Mon, Aug 11, 2003 at 03:55:08AM -0500 or thereabouts, Matt Mackall wrote:
...
> I've also added support for a third NIC (TLAN). Accepting patches for
> other cards (only about 10 lines of code each).
...
With the patch below netconsole works with the ne2k-pci driver.
The patch applies on 2.6.0-test4.
Tested with my RealTek RTL-8029 card.
Are you interested on code cleanup patches etc. for netconsole too?
Steffen
--- vanilla-2.6.0-test4/drivers/net/ne2k-pci.c Fri Aug 22 23:53:07 2003
+++ linux-2.6.0-test4-sk/drivers/net/ne2k-pci.c Sat Aug 23 11:04:36 2003
@@ -167,6 +167,7 @@ MODULE_DEVICE_TABLE(pci, ne2k_pci_tbl);
static int ne2k_pci_open(struct net_device *dev);
static int ne2k_pci_close(struct net_device *dev);
+static void poll_ne2k_pci(struct net_device *dev);
static void ne2k_pci_reset_8390(struct net_device *dev);
static void ne2k_pci_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
int ring_page);
@@ -362,6 +363,10 @@ static int __devinit ne2k_pci_init_one (
dev->open = &ne2k_pci_open;
dev->stop = &ne2k_pci_close;
dev->do_ioctl = &netdev_ioctl;
+#ifdef HAVE_POLL_CONTROLLER
+ dev->poll_controller = &poll_ne2k_pci;
+#endif
+
NS8390_init(dev, 0);
i = register_netdev(dev);
@@ -436,6 +441,23 @@ static void ne2k_pci_reset_8390(struct n
}
outb(ENISR_RESET, NE_BASE + EN0_ISR); /* Ack intr. */
}
+
+#ifdef HAVE_POLL_CONTROLLER
+
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+
+static void poll_ne2k_pci (struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ ei_interrupt (dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+
+#endif
/* Grab the 8390 specific header. Similar to the block_input routine, but
we don't need to be concerned with ring wrap as the header will be at
next prev parent reply other threads:[~2003-08-28 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-11 8:55 Matt Mackall
2003-08-26 20:57 ` Peter Osterlund
2003-08-27 21:08 ` Herbert Pötzl
2003-08-27 21:14 ` J.A. Magallon
2003-08-28 12:38 ` Steffen Klassert [this message]
2003-08-12 14:13 Jon Burgess
2003-08-12 16:33 ` Matt Mackall
2003-08-12 17:09 ` Jeff Garzik
2003-08-12 17:39 ` 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=20030828123837.GA6933@gareth.mathematik.tu-chemnitz.de \
--to=klassert@mathematik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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
all inboxes | Powered by JetHome®