netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dwc_eth_qos: Reset hardware before PHY start
@ 2016-02-02  8:39 Rabin Vincent
  2016-02-06  8:38 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Rabin Vincent @ 2016-02-02  8:39 UTC (permalink / raw)
  To: davem; +Cc: larper, netdev, Rabin Vincent

From: Rabin Vincent <rabinv@axis.com>

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>
---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
index 70814b7..fc8bbff 100644
--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
@@ -1880,9 +1880,9 @@ static int dwceqos_open(struct net_device *ndev)
 	}
 	netdev_reset_queue(ndev);
 
+	dwceqos_init_hw(lp);
 	napi_enable(&lp->napi);
 	phy_start(lp->phy_dev);
-	dwceqos_init_hw(lp);
 
 	netif_start_queue(ndev);
 	tasklet_enable(&lp->tx_bdreclaim_tasklet);
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dwc_eth_qos: Reset hardware before PHY start
  2016-02-02  8:39 [PATCH] dwc_eth_qos: Reset hardware before PHY start Rabin Vincent
@ 2016-02-06  8:38 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-06  8:38 UTC (permalink / raw)
  To: rabin.vincent; +Cc: larper, netdev, rabinv

From: Rabin Vincent <rabin.vincent@axis.com>
Date: Tue, 2 Feb 2016 09:39:02 +0100

> From: Rabin Vincent <rabinv@axis.com>
> 
> 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>

Applied to 'net', thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-06  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02  8:39 [PATCH] dwc_eth_qos: Reset hardware before PHY start Rabin Vincent
2016-02-06  8:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).