mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
cd54b2d42b
- Refreshed all patches - Removed upstreamed - Adapted 4 patches: 473-fix-marvell-phy-initialization-issues.patch ----------------------------------------------- Removed hunk 5 which got upstreamed 403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch 404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch -------------------------------------------------------------- Adapted these 2 RFC patches, merging the delta's from an upstream commit (see below) which made it before these 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux- stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0 180-usb-xhci-add-support-for-performing-fake-doorbell.patch ----------------------------------------------------------- - Moved fake_doorbell bitmask due to new item Compile tested on: cns3xxx, imx6 Run tested on: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
From: Marko Ratkaj <marko.ratkaj@sartura.hr>
|
|
Date: Fri, 7 Apr 2017 13:30:30 +0200
|
|
Subject: [PATCH] fix marvell phy initialization issues
|
|
|
|
Fix Marvell PHYs initialization issues and optimize
|
|
logic for page changing during init
|
|
|
|
Board affected with initialization bug:
|
|
SolidRun ClearFog Base
|
|
|
|
Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
|
|
---
|
|
drivers/net/phy/marvell.c | 9 ++++-----
|
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/phy/marvell.c
|
|
+++ b/drivers/net/phy/marvell.c
|
|
@@ -369,7 +369,7 @@ static int m88e1111_config_aneg(struct p
|
|
static int marvell_of_reg_init(struct phy_device *phydev)
|
|
{
|
|
const __be32 *paddr;
|
|
- int len, i, saved_page, current_page, page_changed, ret;
|
|
+ int len, i, saved_page, current_page, ret;
|
|
|
|
if (!phydev->mdio.dev.of_node)
|
|
return 0;
|
|
@@ -382,7 +382,6 @@ static int marvell_of_reg_init(struct ph
|
|
saved_page = phy_read(phydev, MII_MARVELL_PHY_PAGE);
|
|
if (saved_page < 0)
|
|
return saved_page;
|
|
- page_changed = 0;
|
|
current_page = saved_page;
|
|
|
|
ret = 0;
|
|
@@ -396,7 +395,6 @@ static int marvell_of_reg_init(struct ph
|
|
|
|
if (reg_page != current_page) {
|
|
current_page = reg_page;
|
|
- page_changed = 1;
|
|
ret = phy_write(phydev, MII_MARVELL_PHY_PAGE, reg_page);
|
|
if (ret < 0)
|
|
goto err;
|
|
@@ -419,7 +417,7 @@ static int marvell_of_reg_init(struct ph
|
|
|
|
}
|
|
err:
|
|
- if (page_changed) {
|
|
+ if (current_page != saved_page) {
|
|
i = phy_write(phydev, MII_MARVELL_PHY_PAGE, saved_page);
|
|
if (ret == 0)
|
|
ret = i;
|