All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: phy: Realtek RTL8211B/C PHY ID fix
@ 2016-03-21 19:29 Karsten Merker
  2016-03-22 22:25 ` Joe Hershberger
  2016-04-03  1:11 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Karsten Merker @ 2016-03-21 19:29 UTC (permalink / raw)
  To: u-boot

The RTL8211B_driver structure in drivers/net/phy/realtek.c contains a
wrong PHY ID (0x1cc910 instead of 0x1cc912) in the uid field.

The lowest four bits of the PHY ID encode the chip revision (B+C/D/E/F)
of the RTL8211 and the code originally applied a mask of 0xfffff0 to
the PHY ID, so that matching the PHY ID to the appropriate driver code
was only done on the chip type (RTL8211), but not on a specific
revision.

After introduction of support for the RTL8211E, which needed another
startup function than the older chip revisions, commit
42205047674d7fc9e0aa747273fbc7dcfbac3183 changed the mask to 0xffffff
to make the chip revision relevant for the match, but didn't provide
the now-relevant lower bits of the uid field for the RTL8211B/C.

Fix this by setting the full PHY ID in the RTL8211B_driver uid field.

Fixes: 42205047674d ("net/phy: realtek: Fix the PHY ID mask to ensure the correct Realtek PHY is detected")
Signed-off-by: Karsten Merker <merker@debian.org>
---
 drivers/net/phy/realtek.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 259a87f..b8525dd 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -5,6 +5,7 @@
  *
  * Copyright 2010-2011, 2015 Freescale Semiconductor, Inc.
  * author Andy Fleming
+ * Copyright 2016 Karsten Merker <merker@debian.org>
  */
 #include <config.h>
 #include <common.h>
@@ -223,7 +224,7 @@ static int rtl8211f_startup(struct phy_device *phydev)
 /* Support for RTL8211B PHY */
 static struct phy_driver RTL8211B_driver = {
 	.name = "RealTek RTL8211B",
-	.uid = 0x1cc910,
+	.uid = 0x1cc912,
 	.mask = 0xffffff,
 	.features = PHY_GBIT_FEATURES,
 	.config = &rtl8211x_config,
-- 
2.1.4

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

* [U-Boot] [PATCH] net: phy: Realtek RTL8211B/C PHY ID fix
  2016-03-21 19:29 [U-Boot] [PATCH] net: phy: Realtek RTL8211B/C PHY ID fix Karsten Merker
@ 2016-03-22 22:25 ` Joe Hershberger
  2016-04-03  1:11 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2016-03-22 22:25 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 21, 2016 at 2:29 PM, Karsten Merker <merker@debian.org> wrote:
> The RTL8211B_driver structure in drivers/net/phy/realtek.c contains a
> wrong PHY ID (0x1cc910 instead of 0x1cc912) in the uid field.
>
> The lowest four bits of the PHY ID encode the chip revision (B+C/D/E/F)
> of the RTL8211 and the code originally applied a mask of 0xfffff0 to
> the PHY ID, so that matching the PHY ID to the appropriate driver code
> was only done on the chip type (RTL8211), but not on a specific
> revision.
>
> After introduction of support for the RTL8211E, which needed another
> startup function than the older chip revisions, commit
> 42205047674d7fc9e0aa747273fbc7dcfbac3183 changed the mask to 0xffffff
> to make the chip revision relevant for the match, but didn't provide
> the now-relevant lower bits of the uid field for the RTL8211B/C.
>
> Fix this by setting the full PHY ID in the RTL8211B_driver uid field.
>
> Fixes: 42205047674d ("net/phy: realtek: Fix the PHY ID mask to ensure the correct Realtek PHY is detected")
> Signed-off-by: Karsten Merker <merker@debian.org>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] net: phy: Realtek RTL8211B/C PHY ID fix
  2016-03-21 19:29 [U-Boot] [PATCH] net: phy: Realtek RTL8211B/C PHY ID fix Karsten Merker
  2016-03-22 22:25 ` Joe Hershberger
@ 2016-04-03  1:11 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-04-03  1:11 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 21, 2016 at 08:29:07PM +0100, Karsten Merker wrote:

> The RTL8211B_driver structure in drivers/net/phy/realtek.c contains a
> wrong PHY ID (0x1cc910 instead of 0x1cc912) in the uid field.
> 
> The lowest four bits of the PHY ID encode the chip revision (B+C/D/E/F)
> of the RTL8211 and the code originally applied a mask of 0xfffff0 to
> the PHY ID, so that matching the PHY ID to the appropriate driver code
> was only done on the chip type (RTL8211), but not on a specific
> revision.
> 
> After introduction of support for the RTL8211E, which needed another
> startup function than the older chip revisions, commit
> 42205047674d7fc9e0aa747273fbc7dcfbac3183 changed the mask to 0xffffff
> to make the chip revision relevant for the match, but didn't provide
> the now-relevant lower bits of the uid field for the RTL8211B/C.
> 
> Fix this by setting the full PHY ID in the RTL8211B_driver uid field.
> 
> Fixes: 42205047674d ("net/phy: realtek: Fix the PHY ID mask to ensure the correct Realtek PHY is detected")
> Signed-off-by: Karsten Merker <merker@debian.org>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160402/e4537484/attachment.sig>

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

end of thread, other threads:[~2016-04-03  1:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 19:29 [U-Boot] [PATCH] net: phy: Realtek RTL8211B/C PHY ID fix Karsten Merker
2016-03-22 22:25 ` Joe Hershberger
2016-04-03  1:11 ` [U-Boot] " 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.