1 # Add a poll controller to the interface - required for netconsole
2 --- ixp425-eth-1.1-r1/ixp425_eth.c.pre-pollcontroller 2005-03-19 14:02:32.883601440 -0800
3 +++ ixp425-eth-1.1-r1/ixp425_eth.c 2005-03-19 14:03:25.849549392 -0800
6 ixEthTxFrameDoneQMCallback(IxQMgrQId? qId, IxQMgrCallbackId? callbackId);
8 +#ifdef CONFIG_NET_POLL_CONTROLLER
9 +/* poll controller (needed for netconsole et al) */
10 +static void ixp425eth_poll_controller(struct net_device *dev);
13 /* Private device data */
15 unsigned int msdu_size;
16 @@ -2462,6 +2467,10 @@
17 ndev->set_multicast_list = dev_set_multicast_list;
18 ndev->flags |= IFF_MULTICAST;
20 +#ifdef CONFIG_NET_POLL_CONTROLLER
21 + ndev->poll_controller = ixp425eth_poll_controller;
24 ndev->set_mac_address = dev_set_mac_address;
26 memcpy(ndev->dev_addr, &default_mac_addr[priv->port_id].macAddress,
27 @@ -2491,6 +2500,23 @@
32 +#ifdef CONFIG_NET_POLL_CONTROLLER
34 + * Polling receive - used by netconsole and other diagnostic tools
35 + * to allow network i/o with interrupts disabled.
36 + * (stolen from 8139too.c by siddy)
38 +static void ixp425eth_poll_controller(struct net_device *dev)
40 + disable_irq(dev->irq);
41 + dev_qmgr_os_isr(dev->irq, dev, NULL);
42 + enable_irq(dev->irq);
48 static int __devinit npe_eth_init_device(struct device *dev)