netconsole support.
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
diff -puN drivers/net/r8169.c~r8169-235 drivers/net/r8169.c
--- linux-2.6.9/drivers/net/r8169.c~r8169-235 2004-10-18 23:39:38.000000000
+0200
+++ linux-2.6.9-fr/drivers/net/r8169.c 2004-10-18 23:56:27.000000000 +0200
@@ -1088,6 +1088,23 @@ static inline void rtl8169_request_timer
add_timer(timer);
}
+#ifdef CONFIG_NET_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 rtl8169_netpoll(struct net_device *dev)
+{
+ struct rtl8169_private *tp = netdev_priv(dev);
+ struct pci_dev *pdev = tp->pci_dev;
+
+ disable_irq(pdev->irq);
+ rtl8169_interrupt(pdev->irq, dev, NULL);
+ enable_irq(pdev->irq);
+}
+#endif
+
static void rtl8169_release_board(struct pci_dev *pdev, struct net_device *dev,
void *ioaddr)
{
@@ -1314,6 +1331,10 @@ rtl8169_init_one(struct pci_dev *pdev, c
dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid;
#endif
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = rtl8169_netpoll;
+#endif
+
tp->intr_mask = 0xffff;
tp->pci_dev = pdev;
tp->mmio_addr = ioaddr;
_
|