diff options
author | Robert Hancock <robert.hancock@calian.com> | 2021-02-16 23:54:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-17 00:23:23 +0100 |
commit | b834489bceccc64641684eee5e93275cdf5f465b (patch) | |
tree | 863d8f09dc8c1fbb07388ae885c4b78105051360 /drivers/net/phy/phy_device.c | |
parent | net: phy: broadcom: Set proper 1000BaseX/SGMII interface mode for BCM54616S (diff) | |
download | linux-b834489bceccc64641684eee5e93275cdf5f465b.tar.xz linux-b834489bceccc64641684eee5e93275cdf5f465b.zip |
net: phy: Add is_on_sfp_module flag and phy_on_sfp helper
Add a flag and helper function to indicate that a PHY device is part of
an SFP module, which is set on attach. This can be used by PHY drivers
to handle SFP-specific quirks or behavior.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 05261698bf74..d6ac3ed38197 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1377,6 +1377,8 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, if (phydev->sfp_bus_attached) dev->sfp_bus = phydev->sfp_bus; + else if (dev->sfp_bus) + phydev->is_on_sfp_module = true; } /* Some Ethernet drivers try to connect to a PHY device before |