Skip to content

Commit

Permalink
net: phy: bcm54140: fix phy_id_mask
Browse files Browse the repository at this point in the history
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: 6937602 ("net: phy: add Broadcom BCM54140 support")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Walle authored and David S. Miller committed May 1, 2020
1 parent 86570d8 commit afcecca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/bcm54140.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 0xfffffff0,
.phy_id_mask = 0xfffffff8,
.name = "Broadcom BCM54140",
.features = PHY_GBIT_FEATURES,
.config_init = bcm54140_config_init,
Expand All @@ -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, 0xfffffff0 },
{ PHY_ID_BCM54140, 0xfffffff8 },
{ }
};

Expand Down

0 comments on commit afcecca

Please sign in to comment.