Re: [PATCH net-next v2 2/4] net: phy: bcm54140: fix phy_id_mask

2020-04-30 Thread David Miller
From: Michael Walle 
Date: Wed, 29 Apr 2020 01:06:57 +0200

> Broadcom defines the bits for this PHY as follows:
>   { oui[24:3], model[6:0], revision[2:0] }
> 
> Thus we have to mask the lower three bits only.
> 
> Fixes: 6937602ed3f9 ("net: phy: add Broadcom BCM54140 support")
> Signed-off-by: Michael Walle 
> Reviewed-by: Andrew Lunn 
> Reviewed-by: Florian Fainelli 

Applied.


[PATCH net-next v2 2/4] net: phy: bcm54140: fix phy_id_mask

2020-04-28 Thread Michael Walle
Broadcom defines the bits for this PHY as follows:
  { oui[24:3], model[6:0], revision[2:0] }

Thus we have to mask the lower three bits only.

Fixes: 6937602ed3f9 ("net: phy: add Broadcom BCM54140 support")
Signed-off-by: Michael Walle 
Reviewed-by: Andrew Lunn 
Reviewed-by: Florian Fainelli 
---
changes since v1:
 - added reviewed-by tags

 drivers/net/phy/bcm54140.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/bcm54140.c b/drivers/net/phy/bcm54140.c
index eb5dbacc1253..edafc9dc2f63 100644
--- a/drivers/net/phy/bcm54140.c
+++ b/drivers/net/phy/bcm54140.c
@@ -852,7 +852,7 @@ static int bcm54140_set_tunable(struct phy_device *phydev,
 static struct phy_driver bcm54140_drivers[] = {
{
.phy_id = PHY_ID_BCM54140,
-   .phy_id_mask= 0xfff0,
+   .phy_id_mask= 0xfff8,
.name   = "Broadcom BCM54140",
.features   = PHY_GBIT_FEATURES,
.config_init= bcm54140_config_init,
@@ -870,7 +870,7 @@ static struct phy_driver bcm54140_drivers[] = {
 module_phy_driver(bcm54140_drivers);
 
 static struct mdio_device_id __maybe_unused bcm54140_tbl[] = {
-   { PHY_ID_BCM54140, 0xfff0 },
+   { PHY_ID_BCM54140, 0xfff8 },
{ }
 };
 
-- 
2.20.1