aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/via/via-velocity.c
diff options
context:
space:
mode:
authorAmit Uttamchandani <auttamchandani@logicube.com>2013-07-18 17:45:22 -0700
committerDavid S. Miller <davem@davemloft.net>2013-07-19 17:34:41 -0700
commit0887a576a17965732270b2f8d37821fc02ef2feb (patch)
treebc308886cb2e367218ed27ca2600240265ebaa1f /drivers/net/ethernet/via/via-velocity.c
parentmISDN: replace sum of bitmasks with OR operation. (diff)
downloadlinux-dev-0887a576a17965732270b2f8d37821fc02ef2feb.tar.xz
linux-dev-0887a576a17965732270b2f8d37821fc02ef2feb.zip
net/velocity: add poll controller function for velocity nic
Add poll controller function for velocity nic. Signed-off-by: Amit Uttamchandani <auttamchandani@logicube.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/via/via-velocity.c')
-rw-r--r--drivers/net/ethernet/via/via-velocity.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index 1d6dc41f755d..ef776310fab1 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -2376,6 +2376,23 @@ out_0:
return ret;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+/**
+ * velocity_poll_controller - Velocity Poll controller function
+ * @dev: network device
+ *
+ *
+ * Used by NETCONSOLE and other diagnostic tools to allow network I/P
+ * with interrupts disabled.
+ */
+static void velocity_poll_controller(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ velocity_intr(dev->irq, dev);
+ enable_irq(dev->irq);
+}
+#endif
+
/**
* velocity_mii_ioctl - MII ioctl handler
* @dev: network device
@@ -2641,6 +2658,9 @@ static const struct net_device_ops velocity_netdev_ops = {
.ndo_do_ioctl = velocity_ioctl,
.ndo_vlan_rx_add_vid = velocity_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = velocity_vlan_rx_kill_vid,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = velocity_poll_controller,
+#endif
};
/**