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

Samuel Holland samuel at sholland.org
Fri Nov 5 01:36:01 CET 2021


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 at konsulko.com>
Signed-off-by: Samuel Holland <samuel at 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;
-- 
2.32.0



More information about the U-Boot mailing list