diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2021-11-16 12:55:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-17 14:17:44 +0300 |
commit | 136a3fa28a9f562e2d693e78b902bf8e5cfa1658 (patch) | |
tree | 5fb18738169fcd45d93e9d4e5ab56877b2591da5 /drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |
parent | 01dd74246c75ed0992a5f4ed83e8527a7197f720 (diff) | |
download | linux-136a3fa28a9f562e2d693e78b902bf8e5cfa1658.tar.xz |
net: axienet: populate supported_interfaces member
Populate the phy_interface_t bitmap for the Xilinx axienet driver with
interfaces modes supported by the MAC.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet_main.c')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 9b068b81ae09..8a0a43d71b51 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2105,6 +2105,14 @@ static int axienet_probe(struct platform_device *pdev) lp->phylink_config.dev = &ndev->dev; lp->phylink_config.type = PHYLINK_NETDEV; + __set_bit(lp->phy_mode, lp->phylink_config.supported_interfaces); + if (lp->switch_x_sgmii) { + __set_bit(PHY_INTERFACE_MODE_1000BASEX, + lp->phylink_config.supported_interfaces); + __set_bit(PHY_INTERFACE_MODE_SGMII, + lp->phylink_config.supported_interfaces); + } + lp->phylink = phylink_create(&lp->phylink_config, pdev->dev.fwnode, lp->phy_mode, &axienet_phylink_ops); |