aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/ixp425-eth/files/pollcontroller.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/ixp425-eth/files/pollcontroller.patch')
-rw-r--r--recipes/ixp425-eth/files/pollcontroller.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes/ixp425-eth/files/pollcontroller.patch b/recipes/ixp425-eth/files/pollcontroller.patch
new file mode 100644
index 0000000000..f95db28977
--- /dev/null
+++ b/recipes/ixp425-eth/files/pollcontroller.patch
@@ -0,0 +1,50 @@
+# Add a poll controller to the interface - required for netconsole
+--- ixp425-eth-1.1-r1/ixp425_eth.c.pre-pollcontroller 2005-03-19 14:02:32.883601440 -0800
++++ ixp425-eth-1.1-r1/ixp425_eth.c 2005-03-19 14:03:25.849549392 -0800
+@@ -273,6 +273,11 @@
+ extern void
+ ixEthTxFrameDoneQMCallback(IxQMgrQId? qId, IxQMgrCallbackId? callbackId);
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/* poll controller (needed for netconsole et al) */
++static void ixp425eth_poll_controller(struct net_device *dev);
++#endif
++
+ /* Private device data */
+ typedef struct {
+ unsigned int msdu_size;
+@@ -2462,6 +2467,10 @@
+ ndev->set_multicast_list = dev_set_multicast_list;
+ ndev->flags |= IFF_MULTICAST;
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ ndev->poll_controller = ixp425eth_poll_controller;
++#endif
++
+ ndev->set_mac_address = dev_set_mac_address;
+
+ memcpy(ndev->dev_addr, &default_mac_addr[priv->port_id].macAddress,
+@@ -2491,6 +2500,23 @@
+ return res;
+ }
+
++
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/*
++ * Polling receive - used by netconsole and other diagnostic tools
++ * to allow network i/o with interrupts disabled.
++ * (stolen from 8139too.c by siddy)
++ */
++static void ixp425eth_poll_controller(struct net_device *dev)
++{
++ disable_irq(dev->irq);
++ dev_qmgr_os_isr(dev->irq, dev, NULL);
++ enable_irq(dev->irq);
++}
++#endif
++
++
++
+ static int __devinit npe_eth_init_device(struct device *dev)
+ {
+ int res = -ENOMEM;