summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-05 14:10:34 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-05 14:10:34 +0000
commit808a6ab903d17969e284cadd416f8f126b40648c (patch)
tree2d650bbefd9d19fb956b7741586fde459126c5ee /target/linux/ramips/files/drivers/net
parent0db53d4a64e43fee70ff31c0221e0b03001dc786 (diff)
ramips: Allow ethernet interface to be taken down and up again
Taking the ramips ethernet interface down and up again resulted in the driver not receiving any frames anymore. Fix this by correctly disabling interrupts in the hw on ifdown. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23243 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/net')
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c
index a979fe04c..fb6e6e84e 100644
--- a/target/linux/ramips/files/drivers/net/ramips.c
+++ b/target/linux/ramips/files/drivers/net/ramips.c
@@ -406,6 +406,10 @@ ramips_eth_stop(struct net_device *dev)
ramips_fe_wr(ramips_fe_rr(RAMIPS_PDMA_GLO_CFG) &
~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN),
RAMIPS_PDMA_GLO_CFG);
+
+ /* disable all interrupts in the hw */
+ ramips_fe_wr(0, RAMIPS_FE_INT_ENABLE);
+
free_irq(dev->irq, dev);
netif_stop_queue(dev);
tasklet_kill(&priv->tx_housekeeping_tasklet);