All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: phy: realtek: Set correct bit for 8211e delays
@ 2021-11-05  0:36 Samuel Holland
  2021-11-05  0:51 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2021-11-05  0:36 UTC (permalink / raw)
  To: u-boot, Joe Hershberger
  Cc: Jagan Teki, Andre Przywara, Tom Rini, Samuel Holland, Ramon Fried

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;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: phy: realtek: Set correct bit for 8211e delays
  2021-11-05  0:36 [PATCH] net: phy: realtek: Set correct bit for 8211e delays Samuel Holland
@ 2021-11-05  0:51 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2021-11-05  0:51 UTC (permalink / raw)
  To: Samuel Holland
  Cc: u-boot, Joe Hershberger, Jagan Teki, Andre Przywara, Ramon Fried

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

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

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-05  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05  0:36 [PATCH] net: phy: realtek: Set correct bit for 8211e delays Samuel Holland
2021-11-05  0:51 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.