Skip to contentSkip to conversation

AT91RM9200 Ethernet update 2

PATCH In review Andrew Victor 3 participants 4 messages Dec 4, 2006 – Dec 5, 2006

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

PATCH 1/1 AT91RM9200 Ethernet update 2

This patch adds NetPoll / NetConsole support to the Atmel AT91RM9200 Ethernet driver.

Original patch from Bill Gatliff.

drivers/net/arm/at91_ether.c +14 -0
diff -urN linux-2.6.19-final.orig/drivers/net/arm/at91_ether.c linux-2.6.19-final/drivers/net/arm/at91_ether.c
@@ -925,6 +925,17 @@
 	return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void at91ether_poll_controller(struct net_device *dev)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	at91ether_interrupt(dev->irq, dev, NULL);
+	local_irq_restore(flags);
+}
+#endif
+
 /*
  * Initialize the ethernet interface
  */
@@ -974,6 +985,9 @@
 	dev->set_mac_address = set_mac_address;
 	dev->ethtool_ops = &at91ether_ethtool_ops;
 	dev->do_ioctl = at91ether_ioctl;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = at91ether_poll_controller;
+#endif
 
 	SET_NETDEV_DEV(dev, &pdev->dev);
 
#1 lore raw
Quoted 16 lines · On 04 Dec 2006 14:42:08 +0200 Andrew Victor <[email protected]> wrote:

This patch adds NetPoll / NetConsole support to the Atmel AT91RM9200 Ethernet driver.

Original patch from Bill Gatliff.

diff -urN linux-2.6.19-final.orig/drivers/net/arm/at91_ether.c linux-2.6.19-final/drivers/net/arm/at91_ether.c

drivers/net/arm/at91_ether.c +0 -0
@@ -925,6 +925,17 @@
 	return IRQ_HANDLED;
 }
 

drivers/net/arm/at91_ether.c line 937

Quoted 10 lines
drivers/net/arm/at91_ether.c +10 -0
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void at91ether_poll_controller(struct net_device *dev)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	at91ether_interrupt(dev->irq, dev, NULL);
+	local_irq_restore(flags);
+}
+#endif

poll_controller is always called with interrupts already disabled.

The third argument to interrupt routines was dropped (struct pt_regs) in 2.6.19. Maybe that never got fixed in ARM?

Signature · 1 line
Stephen Hemminger <[email protected]>
#2 lore raw

hi Stephen,

Quoted 1 line

poll_controller is always called with interrupts already disabled.

All the other network drivers I looked at seem to disable the interrupt.

Quoted 2 lines

The third argument to interrupt routines was dropped (struct pt_regs) in 2.6.19. Maybe that never got fixed in ARM?

My mistake - ARM was fixed up.
I rarely compile with netconsole support so this change slipped through.

Regards,
Andrew Victor