diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-11-24 13:28:08 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-28 03:04:12 +0100 |
commit | a22583338e535ba2512283da4aee893163a4b78d (patch) | |
tree | cd1ef40b28ae694575d3f6ad805450d426407ebb /drivers/net/phy/bcm84881.c | |
parent | net: phy: marvell10g: fill in possible_interfaces (diff) | |
download | linux-a22583338e535ba2512283da4aee893163a4b78d.tar.xz linux-a22583338e535ba2512283da4aee893163a4b78d.zip |
net: phy: bcm84881: fill in possible_interfaces
Fill in the possible_interfaces member. This PHY driver only supports
a single configuration found on SFPs.
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/E1r6VI0-00DDLf-Tb@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/bcm84881.c')
-rw-r--r-- | drivers/net/phy/bcm84881.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/phy/bcm84881.c b/drivers/net/phy/bcm84881.c index 9717a1626f3f..f1d47c264058 100644 --- a/drivers/net/phy/bcm84881.c +++ b/drivers/net/phy/bcm84881.c @@ -29,8 +29,19 @@ static int bcm84881_wait_init(struct phy_device *phydev) 100000, 2000000, false); } +static void bcm84881_fill_possible_interfaces(struct phy_device *phydev) +{ + unsigned long *possible = phydev->possible_interfaces; + + __set_bit(PHY_INTERFACE_MODE_SGMII, possible); + __set_bit(PHY_INTERFACE_MODE_2500BASEX, possible); + __set_bit(PHY_INTERFACE_MODE_10GBASER, possible); +} + static int bcm84881_config_init(struct phy_device *phydev) { + bcm84881_fill_possible_interfaces(phydev); + switch (phydev->interface) { case PHY_INTERFACE_MODE_SGMII: case PHY_INTERFACE_MODE_2500BASEX: @@ -39,6 +50,7 @@ static int bcm84881_config_init(struct phy_device *phydev) default: return -ENODEV; } + return 0; } |