ramips: Allow ethernet interface to be taken down and up again
authorGabor Juhos <juhosg@openwrt.org>
Tue, 5 Oct 2010 14:10:34 +0000 (14:10 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 5 Oct 2010 14:10:34 +0000 (14:10 +0000)
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>
SVN-Revision: 23243

target/linux/ramips/files/drivers/net/ramips.c

index a979fe04c7d9246d13d6682a7da36e96067c875d..fb6e6e84ef0eaa9fdfeab076d345b40f7a4d3f97 100644 (file)
@@ -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);