Skip to contentSkip to conversation

Add NETPOLL Support to SB1250 driver

PATCH In review Manish Lachwani 2 participants 2 messages Sep 27, 2006

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

PATCH 1/1 Add NETPOLL Support to SB1250 driver

Hello!

Attached patch adds NETPOLL support for the Sibyte Network driver.

Thanks,
Manish Lachwani

Source: MontaVista Software, Inc. | Manish Lachwani <[email protected]>

NETPOLL support for Sibyte MAC

 drivers/net/sb1250-mac.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)
drivers/net/sb1250-mac.c +14 -0
Index: linux-2.6.18/drivers/net/sb1250-mac.c
===================================================================
@@ -1128,6 +1128,17 @@ static void sbdma_fillring(sbmacdma_t *d
 	}
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void sbmac_netpoll(struct net_device *netdev)
+{
+	struct sbmac_softc *sc = netdev_priv(netdev);
+	int irq = sc->sbm_dev->irq;
+
+	disable_irq(irq);
+	sbmac_intr(irq, netdev, NULL);
+	enable_irq(irq);
+}
+#endif
 
 /**********************************************************************
  *  SBDMA_RX_PROCESS(sc,d)
@@ -2402,6 +2413,9 @@ static int sbmac_init(struct net_device 
 	dev->watchdog_timeo     = TX_TIMEOUT;
 
 	dev->change_mtu         = sb1250_change_mtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = sbmac_netpoll;
+#endif
 
 	/* This is needed for PASS2 for Rx H/W checksum feature */
 	sbmac_set_iphdr_offset(sc);
#1 lore raw
Quoted 8 lines · Manish Lachwani

Hello!

Attached patch adds NETPOLL support for the Sibyte Network driver.

Thanks,
Manish Lachwani

Quoted 5 lines

------------------------------------------------------------------------

Source: MontaVista Software, Inc. | Manish Lachwani <[email protected]>

NETPOLL support for Sibyte MAC

ACK patch, NAK patch format.

Most importantly, it uses attachments and doesn't include a Signed-off-by line.

Read Documentation/SubmittingPatches and http://linux.yyz.us/patch-format.html

Jeff