[PATCH] net: phy: realtek: Set correct bit for 8211e delays

commit cb1d40151489 ("net: phy: realtek: Add tx/rx delay config for 8211e") added support for all four possible delay combinations, but set the wrong bit in the RXID and TXID cases. This broke Ethernet on boards using one of those settings. Fix that by fixing the bit selection.
Fixes: cb1d40151489 ("net: phy: realtek: Add tx/rx delay config for 8211e") Reported-by: Tom Rini trini@konsulko.com Signed-off-by: Samuel Holland samuel@sholland.org ---
drivers/net/phy/realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 84c755525f..24c3ea59bb 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -194,10 +194,10 @@ static int rtl8211e_config(struct phy_device *phydev) MIIM_RTL8211E_RX_DELAY; break; case PHY_INTERFACE_MODE_RGMII_RXID: - val = MIIM_RTL8211E_CTRL_DELAY | MIIM_RTL8211E_TX_DELAY; + val = MIIM_RTL8211E_CTRL_DELAY | MIIM_RTL8211E_RX_DELAY; break; case PHY_INTERFACE_MODE_RGMII_TXID: - val = MIIM_RTL8211E_CTRL_DELAY | MIIM_RTL8211E_RX_DELAY; + val = MIIM_RTL8211E_CTRL_DELAY | MIIM_RTL8211E_TX_DELAY; break; default: /* the rest of the modes imply leaving delays as is. */ goto default_delay;

On Thu, Nov 04, 2021 at 07:36:01PM -0500, Samuel Holland wrote:
commit cb1d40151489 ("net: phy: realtek: Add tx/rx delay config for 8211e") added support for all four possible delay combinations, but set the wrong bit in the RXID and TXID cases. This broke Ethernet on boards using one of those settings. Fix that by fixing the bit selection.
Fixes: cb1d40151489 ("net: phy: realtek: Add tx/rx delay config for 8211e") Reported-by: Tom Rini trini@konsulko.com Signed-off-by: Samuel Holland samuel@sholland.org
On top of the problematic commit (which will need to be fixed-up when applied): Tested-by: Tom Rini trini@konsulko.com on Pine A64+ Rev B
participants (2)
-
Samuel Holland
-
Tom Rini