static int ramips_eth_stop(struct net_device *dev) { struct raeth_priv *re = netdev_priv(dev); ramips_fe_twr(ramips_fe_trr(RAETH_REG_PDMA_GLO_CFG) & ~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN), RAETH_REG_PDMA_GLO_CFG); netif_stop_queue(dev); ramips_phy_stop(re); RADEBUG("ramips_eth: stopped\n"); return 0; }
static int ramips_eth_stop(struct net_device *dev) { struct raeth_priv *priv = netdev_priv(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); ramips_phy_stop(priv); free_irq(dev->irq, dev); netif_stop_queue(dev); tasklet_kill(&priv->tx_housekeeping_tasklet); tasklet_kill(&priv->rx_tasklet); ramips_cleanup_dma(priv); RADEBUG("ramips_eth: stopped\n"); return 0; }