Skip to contentSkip to conversation

LLTX support

SUNGEM Eric Lemoine 2 participants 5 messages Sep 15, 2004 – Sep 16, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The attached patch adds LLTX support to SunGEM NAPI. The tx_lock patch I just sent must be applied first.

Thanks,

Signature · 1 line
Eric
maintainer
#1 lore raw
Quoted 2 lines · On Wed, 15 Sep 2004 08:45:21 +0200 Eric Lemoine <[email protected]> wrote:

The attached patch adds LLTX support to SunGEM NAPI. The tx_lock patch I just sent must be applied first.

Also applied, thanks Eric.

I remember you mentioning yesterday that Harald's sungem NAPI patch had netpoll support, can you cook up a patch that adds it for current sungem?

Thanks.

#2 lore raw
Quoted 11 lines · David S. Miller
Quoted 2 lines · On Wed, 15 Sep 2004 08:45:21 +0200 Eric Lemoine <[email protected]> wrote:

The attached patch adds LLTX support to SunGEM NAPI. The tx_lock patch I just sent must be applied first.

Also applied, thanks Eric.

I remember you mentioning yesterday that Harald's sungem NAPI patch had netpoll support, can you cook up a patch that adds it for current sungem?

Can't do it right now but will do it soon...

Signature · 1 line
Eric
#3 lore raw
In reply to David S. Miller
Quoted 11 lines · David S. Miller
Quoted 2 lines · On Wed, 15 Sep 2004 08:45:21 +0200 Eric Lemoine <[email protected]> wrote:

The attached patch adds LLTX support to SunGEM NAPI. The tx_lock patch I just sent must be applied first.

Also applied, thanks Eric.

I remember you mentioning yesterday that Harald's sungem NAPI patch had netpoll support, can you cook up a patch that adds it for current sungem?

Patch attached. Unlike Harald's, this patch doesn't disable_irq before calling gem_interrupt because gem_interrupt is safe to reentrance. Hopefully this is correct...

Signature · 1 line
Eric

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/09/15 23:37:24+02:00 [email protected]
# [SUNGEM] netpoll support
#
# Signed-off-by: Eric Lemoine <[email protected]>
#

# drivers/net/sungem.c
#   2004/09/15 23:37:15+02:00 [email protected] +16 -0
#   [SUNGEM] netpoll support
#   
#   Signed-off-by: Eric Lemoine <[email protected]>
# 
diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c
--- a/drivers/net/sungem.c	2004-09-15 23:38:12 +02:00
+++ b/drivers/net/sungem.c	2004-09-15 23:38:12 +02:00
@@ -5,6 +5,9 @@
  * 
  * Support for Apple GMAC and assorted PHYs by
  * Benjamin Herrenscmidt ([email protected])
+ *
+ * NAPI and NETPOLL support
+ * (C) 2004 by Eric Lemoine ([email protected])
  * 
  * TODO: 
  *  - Get rid of all those nasty mdelay's and replace them
@@ -898,6 +901,16 @@
 	return IRQ_HANDLED;
 }

+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void gem_poll_controller(struct net_device *dev) +{
+ /* gem_interrupt is safe to reentrance so no need
+ * to disable_irq here.
+ */
+ gem_interrupt(dev->irq, dev, NULL);
+}
+#endif
+
static void gem_tx_timeout(struct net_device *dev) {
struct gem *gp = dev->priv;
@@ -2934,6 +2947,9 @@
dev->change_mtu = gem_change_mtu; dev->irq = pdev->irq;
dev->dma = 0;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = gem_poll_controller;
+#endif

if (register_netdev(dev)) {
printk(KERN_ERR PFX "Cannot register net device, "

maintainer
#4 lore raw
Quoted 7 lines · On Wed, 15 Sep 2004 23:43:16 +0200 Eric Lemoine <[email protected]> wrote:
Quoted 6 lines · David S. Miller
Quoted 2 lines · On Wed, 15 Sep 2004 08:45:21 +0200 Eric Lemoine <[email protected]> wrote:

The attached patch adds LLTX support to SunGEM NAPI. The tx_lock patch I just sent must be applied first.

Quoted 8 lines
Quoted 5 lines

Also applied, thanks Eric.

I remember you mentioning yesterday that Harald's sungem NAPI patch had netpoll support, can you cook up a patch that adds it for current sungem?

Patch attached. Unlike Harald's, this patch doesn't disable_irq before calling gem_interrupt because gem_interrupt is safe to reentrance.

Looks fine to me. Patch applied, thanks Eric.