netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rabin Vincent <rabin.vincent@axis.com>
To: <davem@davemloft.net>
Cc: <larper@axis.com>, <netdev@vger.kernel.org>,
	Rabin Vincent <rabinv@axis.com>
Subject: [PATCH] dwc_eth_qos: Reset hardware before PHY start
Date: Tue, 2 Feb 2016 09:39:02 +0100	[thread overview]
Message-ID: <1454402342-20477-1-git-send-email-rabin.vincent@axis.com> (raw)

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

             reply	other threads:[~2016-02-02  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02  8:39 Rabin Vincent [this message]
2016-02-06  8:38 ` [PATCH] dwc_eth_qos: Reset hardware before PHY start David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454402342-20477-1-git-send-email-rabin.vincent@axis.com \
    --to=rabin.vincent@axis.com \
    --cc=davem@davemloft.net \
    --cc=larper@axis.com \
    --cc=netdev@vger.kernel.org \
    --cc=rabinv@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).