aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-11-19 09:19:49 +0000
committerJohn Crispin <blogic@openwrt.org>2014-11-19 09:19:49 +0000
commit0f47bf20deea97a781755501a75b2674b3d0335a (patch)
tree518aba7cc8de0d5fa7cc022dffc60dd9d14f511f /target/linux/ramips
parent2825bdda9f7bb19958953066aba7ab4912f0d0e8 (diff)
downloadupstream-0f47bf20deea97a781755501a75b2674b3d0335a.tar.gz
upstream-0f47bf20deea97a781755501a75b2674b3d0335a.tar.bz2
upstream-0f47bf20deea97a781755501a75b2674b3d0335a.zip
ralink: support netconsole
Signed-off-by: michael lee <igvtee@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43302 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index c62fb8f56d..55f01f1fdb 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -914,6 +914,18 @@ static irqreturn_t fe_handle_irq(int irq, void *dev)
return IRQ_HANDLED;
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void fe_poll_controller(struct net_device *dev)
+{
+ struct fe_priv *priv = netdev_priv(dev);
+ u32 dly_int = priv->soc->tx_dly_int | priv->soc->rx_dly_int;
+
+ fe_int_disable(dly_int);
+ fe_handle_irq(dev->irq, dev);
+ fe_int_enable(dly_int);
+}
+#endif
+
int fe_set_clock_cycle(struct fe_priv *priv)
{
unsigned long sysclk = priv->sysclk;
@@ -1232,6 +1244,9 @@ static const struct net_device_ops fe_netdev_ops = {
.ndo_get_stats64 = fe_get_stats64,
.ndo_vlan_rx_add_vid = fe_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = fe_vlan_rx_kill_vid,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = fe_poll_controller,
+#endif
};
static int fe_probe(struct platform_device *pdev)