diff options
author | Harini Katakam <harini.katakam@amd.com> | 2022-10-14 12:17:35 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-29 10:20:35 +0200 |
commit | b87f88d58f1b404769fb6999e965beeee6958027 (patch) | |
tree | 6f167ed954f1841cdfcbf4be9f770774a2baf14a | |
parent | 6453077a00c1b2f068a1b6e184601d50eff653ea (diff) | |
download | linux-stable-b87f88d58f1b404769fb6999e965beeee6958027.tar.gz linux-stable-b87f88d58f1b404769fb6999e965beeee6958027.tar.bz2 linux-stable-b87f88d58f1b404769fb6999e965beeee6958027.zip |
net: phy: dp83867: Extend RX strap quirk for SGMII mode
[ Upstream commit 0c9efbd5c50c64ead434960a404c9c9a097b0403 ]
When RX strap in HW is not set to MODE 3 or 4, bit 7 and 8 in CF4
register should be set. The former is already handled in
dp83867_config_init; add the latter in SGMII specific initialization.
Fixes: 2a10154abcb7 ("net: phy: dp83867: Add TI dp83867 phy")
Signed-off-by: Harini Katakam <harini.katakam@amd.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/net/phy/dp83867.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 87c0cdbf262a..c7d91415a436 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -432,6 +432,14 @@ static int dp83867_config_init(struct phy_device *phydev) else val &= ~DP83867_SGMII_TYPE; phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL, val); + + /* This is a SW workaround for link instability if RX_CTRL is + * not strapped to mode 3 or 4 in HW. This is required for SGMII + * in addition to clearing bit 7, handled above. + */ + if (dp83867->rxctrl_strap_quirk) + phy_set_bits_mmd(phydev, DP83867_DEVADDR, DP83867_CFG4, + BIT(8)); } val = phy_read(phydev, DP83867_CFG3); |