Whamcloud - gitweb
b=4336
[fs/lustre-release.git] / lustre / kernel_patches / patches / netpoll-pcnet32.patch
1  drivers/net/pcnet32.c |   16 ++++++++++++++++
2  1 files changed, 16 insertions(+)
3
4 diff -puN drivers/net/pcnet32.c~kgdbeth-pcnet32-support drivers/net/pcnet32.c
5 --- linux-2.6.0-test6-mm/drivers/net/pcnet32.c~kgdbeth-pcnet32-support  2003-10-06 00:45:54.000000000 +0400
6 +++ linux-2.6.0-test6-mm-alexey/drivers/net/pcnet32.c   2003-10-06 00:54:55.000000000 +0400
7 @@ -331,6 +331,9 @@ static int  pcnet32_init_ring(struct net
8  static int  pcnet32_start_xmit(struct sk_buff *, struct net_device *);
9  static int  pcnet32_rx(struct net_device *);
10  static void pcnet32_tx_timeout (struct net_device *dev);
11 +#ifdef CONFIG_NET_POLL_CONTROLLER
12 +static void pcnet32_rx_poll(struct net_device *);
13 +#endif
14  static irqreturn_t pcnet32_interrupt(int, void *, struct pt_regs *);
15  static int  pcnet32_close(struct net_device *);
16  static struct net_device_stats *pcnet32_get_stats(struct net_device *);
17 @@ -806,6 +809,10 @@ pcnet32_probe1(unsigned long ioaddr, uns
18      dev->tx_timeout = pcnet32_tx_timeout;
19      dev->watchdog_timeo = (5*HZ);
20  
21 +#ifdef CONFIG_NET_POLL_CONTROLLER
22 +    dev->poll_controller = pcnet32_rx_poll;
23 +#endif
24 +
25      lp->next = pcnet32_dev;
26      pcnet32_dev = dev;
27  
28 @@ -1152,6 +1159,15 @@ pcnet32_start_xmit(struct sk_buff *skb, 
29      return 0;
30  }
31  
32 +#ifdef CONFIG_NET_POLL_CONTROLLER
33 +static void pcnet32_rx_poll(struct net_device *dev)
34 +{
35 +       disable_irq(dev->irq);
36 +       pcnet32_interrupt(dev->irq, (void *)dev, 0);
37 +       enable_irq(dev->irq);
38 +}       
39 +#endif
40 +
41  /* The PCNET32 interrupt handler. */
42  static irqreturn_t
43  pcnet32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
44
45 _