From: Alexander Holler <holler@ahsoftware.de>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Alexander Holler <holler@ahsoftware.de>, <stable@vger.kernel.org>
Subject: [PATCH regression] net: phy: fix initialization (config_init) for Marvel 88E1116R PHYs
Date: Wed, 2 Apr 2014 01:55:59 +0200 [thread overview]
Message-ID: <1396396559-6971-1-git-send-email-holler@ahsoftware.de> (raw)
Commit 7cd1463664c2a15721ff4ccfb61d4d970815cb3d (introduced with 3.14)
changed the initialization of the mv643xx_eth driver to use phy_init_hw()
to reset the PHY. Unfortunately the initialization for the 88E1116R PHY
was broken such, that it used mdelay() instead of really waiting for a
reset to finish.
The effect was that the ethernet on my Kirkwood 88F6281 based device didn't
come up anymore (no carrier).
Fix this by waiting for a reset to finish before proceeding further.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: <stable@vger.kernel.org>
---
drivers/net/phy/marvell.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index bd37e45..5b84808 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -396,7 +396,9 @@ static int m88e1116r_config_init(struct phy_device *phydev)
if (err < 0)
return err;
- mdelay(500);
+ do
+ temp = phy_read(phydev, MII_BMCR);
+ while (temp & BMCR_RESET);
err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0);
if (err < 0)
@@ -429,7 +431,9 @@ static int m88e1116r_config_init(struct phy_device *phydev)
if (err < 0)
return err;
- mdelay(500);
+ do
+ temp = phy_read(phydev, MII_BMCR);
+ while (temp & BMCR_RESET);
return 0;
}
--
1.8.3.1
next reply other threads:[~2014-04-01 23:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 23:55 Alexander Holler [this message]
2014-04-02 0:00 ` [PATCH regression] net: phy: fix initialization (config_init) for Marvel 88E1116R PHYs Florian Fainelli
2014-04-02 0:57 ` Florian Fainelli
2014-04-02 9:09 ` Alexander Holler
2014-04-02 10:54 ` Alexander Holler
2014-04-02 19:01 ` Florian Fainelli
2014-04-02 20:25 ` Sebastian Hesselbarth
2014-04-02 22:12 ` Alexander Holler
2014-04-02 22:20 ` Florian Fainelli
2014-04-02 22:27 ` Sebastian Hesselbarth
2014-04-03 7:17 ` Alexander Holler
2014-04-03 8:49 ` Sebastian Hesselbarth
2014-04-03 15:06 ` Alexander Holler
2014-04-03 15:14 ` David Miller
2014-04-03 15:45 ` Alexander Holler
2014-04-03 15:45 ` Sebastian Hesselbarth
2014-04-03 15:58 ` Alexander Holler
2014-04-03 17:58 ` Bug(s) with netconsole (using mv643xx_eth on Kirkwood) Alexander Holler
2014-04-03 18:21 ` Sebastian Hesselbarth
2014-04-03 18:23 ` Alexander Holler
2014-04-03 18:39 ` Alexander Holler
2014-04-03 18:44 ` Florian Fainelli
2014-04-04 11:36 ` Alexander Holler
2014-04-03 17:44 ` [PATCH regression] net: phy: fix initialization (config_init) for Marvel 88E1116R PHYs Sebastian Hesselbarth
2014-04-03 18:20 ` Alexander Holler
2014-04-02 22:30 ` Sebastian Hesselbarth
2014-04-02 11:51 ` Sergei Shtylyov
2014-04-02 12:07 ` Sergei Shtylyov
2014-04-02 14:35 ` Alexander Holler
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=1396396559-6971-1-git-send-email-holler@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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).