ar71xx: fix ethernet driver fast reset issue causing tx timeouts
authorFelix Fietkau <nbd@nbd.name>
Sat, 3 Sep 2016 11:46:18 +0000 (13:46 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 3 Sep 2016 20:50:28 +0000 (22:50 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index a610406502d7511c094f0b75d43c69386f6a92dc..566e9513d8b7c6ef101902ae7d281dcc1c233893 100644 (file)
@@ -527,6 +527,8 @@ static void ag71xx_fast_reset(struct ag71xx *ag)
        mii_reg = ag71xx_rr(ag, AG71XX_REG_MII_CFG);
        rx_ds = ag71xx_rr(ag, AG71XX_REG_RX_DESC);
 
+       ag71xx_tx_packets(ag, true);
+
        ath79_device_reset_set(reset_mask);
        udelay(10);
        ath79_device_reset_clear(reset_mask);
@@ -534,7 +536,6 @@ static void ag71xx_fast_reset(struct ag71xx *ag)
 
        ag71xx_dma_reset(ag);
        ag71xx_hw_setup(ag);
-       ag71xx_tx_packets(ag, true);
        ag->tx_ring.curr = 0;
        ag->tx_ring.dirty = 0;
        netdev_reset_queue(ag->dev);