diff options
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index e82aee41d77e..722265920da8 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -599,6 +599,21 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) | |||
599 | return IRQ_HANDLED; | 599 | return IRQ_HANDLED; |
600 | } | 600 | } |
601 | 601 | ||
602 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
603 | /* | ||
604 | * Polling receive - used by netconsole and other diagnostic tools | ||
605 | * to allow network i/o with interrupts disabled. | ||
606 | */ | ||
607 | static void macb_poll_controller(struct net_device *dev) | ||
608 | { | ||
609 | unsigned long flags; | ||
610 | |||
611 | local_irq_save(flags); | ||
612 | macb_interrupt(dev->irq, dev); | ||
613 | local_irq_restore(flags); | ||
614 | } | ||
615 | #endif | ||
616 | |||
602 | static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) | 617 | static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) |
603 | { | 618 | { |
604 | struct macb *bp = netdev_priv(dev); | 619 | struct macb *bp = netdev_priv(dev); |
@@ -1094,6 +1109,9 @@ static const struct net_device_ops macb_netdev_ops = { | |||
1094 | .ndo_validate_addr = eth_validate_addr, | 1109 | .ndo_validate_addr = eth_validate_addr, |
1095 | .ndo_change_mtu = eth_change_mtu, | 1110 | .ndo_change_mtu = eth_change_mtu, |
1096 | .ndo_set_mac_address = eth_mac_addr, | 1111 | .ndo_set_mac_address = eth_mac_addr, |
1112 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1113 | .ndo_poll_controller = macb_poll_controller, | ||
1114 | #endif | ||
1097 | }; | 1115 | }; |
1098 | 1116 | ||
1099 | static int __init macb_probe(struct platform_device *pdev) | 1117 | static int __init macb_probe(struct platform_device *pdev) |