aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r--drivers/net/macb.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e82aee41d77e..5b5c25368d1e 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 */
607static 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
602static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev) 617static 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);
@@ -630,7 +645,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
630 "BUG! Tx Ring full when queue awake!\n"); 645 "BUG! Tx Ring full when queue awake!\n");
631 dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n", 646 dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n",
632 bp->tx_head, bp->tx_tail); 647 bp->tx_head, bp->tx_tail);
633 return 1; 648 return NETDEV_TX_BUSY;
634 } 649 }
635 650
636 entry = bp->tx_head; 651 entry = bp->tx_head;
@@ -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
1099static int __init macb_probe(struct platform_device *pdev) 1117static int __init macb_probe(struct platform_device *pdev)