浏览代码

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 <[email protected]>

SVN-Revision: 23243
Gabor Juhos 15 年之前
父节点
当前提交
69355ee10e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      target/linux/ramips/files/drivers/net/ramips.c

+ 4 - 0
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_fe_wr(ramips_fe_rr(RAMIPS_PDMA_GLO_CFG) &
 		     ~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN),
 		     ~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN),
 		     RAMIPS_PDMA_GLO_CFG);
 		     RAMIPS_PDMA_GLO_CFG);
+
+	/* disable all interrupts in the hw */
+	ramips_fe_wr(0, RAMIPS_FE_INT_ENABLE);
+
 	free_irq(dev->irq, dev);
 	free_irq(dev->irq, dev);
 	netif_stop_queue(dev);
 	netif_stop_queue(dev);
 	tasklet_kill(&priv->tx_housekeeping_tasklet);
 	tasklet_kill(&priv->tx_housekeeping_tasklet);