]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ixp425-eth/files/pollcontroller.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ixp425-eth / files / pollcontroller.patch
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
4 @@ -273,6 +273,11 @@
5  extern void
6  ixEthTxFrameDoneQMCallback(IxQMgrQId? qId, IxQMgrCallbackId? callbackId);
7
8 +#ifdef CONFIG_NET_POLL_CONTROLLER
9 +/* poll controller (needed for netconsole et al) */
10 +static void ixp425eth_poll_controller(struct net_device *dev);
11 +#endif
12 +
13  /* Private device data */
14  typedef struct {
15      unsigned int msdu_size;
16 @@ -2462,6 +2467,10 @@
17      ndev->set_multicast_list = dev_set_multicast_list;
18      ndev->flags |= IFF_MULTICAST;
19
20 +#ifdef CONFIG_NET_POLL_CONTROLLER
21 +    ndev->poll_controller = ixp425eth_poll_controller;
22 +#endif
23 +
24      ndev->set_mac_address = dev_set_mac_address;
25
26      memcpy(ndev->dev_addr, &default_mac_addr[priv->port_id].macAddress,
27 @@ -2491,6 +2500,23 @@
28      return res;
29  }
30
31 +
32 +#ifdef CONFIG_NET_POLL_CONTROLLER
33 +/*
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)
37 + */
38 +static void ixp425eth_poll_controller(struct net_device *dev)
39 +{
40 +        disable_irq(dev->irq);
41 +        dev_qmgr_os_isr(dev->irq, dev, NULL);
42 +        enable_irq(dev->irq);
43 +}
44 +#endif
45 +
46 +
47 +
48  static int __devinit npe_eth_init_device(struct device *dev)
49  {
50      int res = -ENOMEM;