public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Elsen <rivy@rivy.org>
To: rjwalsh@durables.org, wangdi@clusterfs.com, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.6-test6-mm4]8139too poll controller
Date: Mon, 6 Oct 2003 23:15:58 +0200	[thread overview]
Message-ID: <200310062315.58397.rivy@rivy.org> (raw)

This patch adds poll-controller functionality to the 8139too driver. It has 
been tested with kgdb-over-ethernet.

Thomas


--- 8139too.c.orig	2003-10-06 22:56:03.000000000 +0200
+++ 8139too.c	2003-10-06 22:48:08.000000000 +0200
@@ -618,6 +618,10 @@
 static void rtl8139_hw_start (struct net_device *dev);
 static struct ethtool_ops rtl8139_ethtool_ops;

+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void rtl8139_rx_poll (struct net_device *dev);
+#endif
+
 #ifdef USE_IO_OPS

 #define RTL_R8(reg)		inb (((unsigned long)ioaddr) + (reg))
@@ -970,6 +974,10 @@
 	dev->tx_timeout = rtl8139_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;

+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = rtl8139_rx_poll;
+#endif
+
 	/* note: the hardware is not capable of sg/csum/highdma, however
 	 * through the use of skb_copy_and_csum_dev we enable these
 	 * features
@@ -2388,6 +2396,15 @@
 	return &tp->stats;
 }

+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void rtl8139_rx_poll (struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	rtl8139_interrupt(dev->irq, (void *)dev, 0);
+	enable_irq(dev->irq);
+}
+#endif
+
 /* Set or clear the multicast filter for this adaptor.
    This routine is not state sensitive and need not be SMP locked. */
 


                 reply	other threads:[~2003-10-06 21:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200310062315.58397.rivy@rivy.org \
    --to=rivy@rivy.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjwalsh@durables.org \
    --cc=wangdi@clusterfs.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