Skip to content

Commit 3647bc3

Browse files
vwaxdavem330
authored andcommitted
dwc_eth_qos: Reset hardware before PHY start
The hardware reset is currently done after phy_start() is called, leading to a race where we can lose the link status if the phy state machine calls dwceqos_adjust_link() before we reset the MAC registers. Acked-by: Lars Persson <larper@axis.com> Signed-off-by: Rabin Vincent <rabinv@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 16186a8 commit 3647bc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/synopsys/dwc_eth_qos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,9 +1880,9 @@ static int dwceqos_open(struct net_device *ndev)
18801880
}
18811881
netdev_reset_queue(ndev);
18821882

1883+
dwceqos_init_hw(lp);
18831884
napi_enable(&lp->napi);
18841885
phy_start(lp->phy_dev);
1885-
dwceqos_init_hw(lp);
18861886

18871887
netif_start_queue(ndev);
18881888
tasklet_enable(&lp->tx_bdreclaim_tasklet);

0 commit comments

Comments
 (0)