Skip to contentSkip to conversation

net: phy: realtek: Set correct bit for 8211e delays

PATCH In review Samuel Holland 2 participants 2 messages Nov 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")

---

 drivers/net/phy/realtek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/realtek.c +2 -2
index 84c755525f..24c3ea59bb 100644
@@ -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;
Signature · 1 line
2.32.0
Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Samuel Holland

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")

On top of the problematic commit (which will need to be fixed-up when applied):

Signature · 1 line
Tom