aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Case <ncase@xes-inc.com>2008-03-21 18:02:42 -0400
committerOlof Johansson <olof@lixom.net>2008-04-07 10:16:26 -0400
commit6e62040c5533a385b90fcb2e33235ad7d351d3e0 (patch)
tree2642f6ec662619c4edb8b00d0a3df79e54668d26
parent1724ac2ef1caf5b4f764d4b86a85d552a7d7c8fb (diff)
pasemi_mac: Netpoll support
Add netpoll support to allow use of netconsole. Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r--drivers/net/pasemi_mac.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index abb1dc4592f7..965f2e4b3452 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -1648,6 +1648,26 @@ static int pasemi_mac_poll(struct napi_struct *napi, int budget)
1648 return pkts; 1648 return pkts;
1649} 1649}
1650 1650
1651#ifdef CONFIG_NET_POLL_CONTROLLER
1652/*
1653 * Polling 'interrupt' - used by things like netconsole to send skbs
1654 * without having to re-enable interrupts. It's not called while
1655 * the interrupt routine is executing.
1656 */
1657static void pasemi_mac_netpoll(struct net_device *dev)
1658{
1659 const struct pasemi_mac *mac = netdev_priv(dev);
1660
1661 disable_irq(mac->tx->chan.irq);
1662 pasemi_mac_tx_intr(mac->tx->chan.irq, mac->tx);
1663 enable_irq(mac->tx->chan.irq);
1664
1665 disable_irq(mac->rx->chan.irq);
1666 pasemi_mac_rx_intr(mac->rx->chan.irq, mac->rx);
1667 enable_irq(mac->rx->chan.irq);
1668}
1669#endif
1670
1651static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) 1671static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu)
1652{ 1672{
1653 struct pasemi_mac *mac = netdev_priv(dev); 1673 struct pasemi_mac *mac = netdev_priv(dev);
@@ -1807,6 +1827,9 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1807 dev->mtu = PE_DEF_MTU; 1827 dev->mtu = PE_DEF_MTU;
1808 /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ 1828 /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */
1809 mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; 1829 mac->bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128;
1830#ifdef CONFIG_NET_POLL_CONTROLLER
1831 dev->poll_controller = pasemi_mac_netpoll;
1832#endif
1810 1833
1811 dev->change_mtu = pasemi_mac_change_mtu; 1834 dev->change_mtu = pasemi_mac_change_mtu;
1812 dev->ethtool_ops = &pasemi_mac_ethtool_ops; 1835 dev->ethtool_ops = &pasemi_mac_ethtool_ops;