diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-09-24 11:01:13 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2017-02-20 10:47:20 +0000 |
commit | 2aac4d3f080d530bbf590bb5249e2ce6f57a8aa6 (patch) | |
tree | 22a89e9e2ae81128983b50a23e1910780a50d7ee /include | |
parent | c8aa45c936a98312a44084c2e3d5a67fbb3ceeb0 (diff) |
phylink: add hooks for SFP support
Add support to phylink for SFP, which needs to control and configure
the ethernet MAC link state. Specifically, SFP needs to:
1. set the negotiation mode between SGMII and 1000base-X
2. attach and detach the module PHY
3. prevent the link coming up when errors are reported
In the absence of a PHY, we also need to set the ethtool port type
according to the module plugged in.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- rework phylink_set_link_*(), combining into a single function.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phylink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 1096e24a2eb2..2c3facb91a65 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -115,6 +115,12 @@ int phylink_ethtool_ksettings_set(struct phylink *, const struct ethtool_link_ksettings *); int phylink_mii_ioctl(struct phylink *, struct ifreq *, int); +int phylink_set_link(struct phylink *pl, unsigned int mode, u8 port, + const unsigned long *support); +void phylink_disable(struct phylink *pl); +void phylink_enable(struct phylink *pl); +struct phylink *phylink_lookup_by_netdev(struct net_device *ndev); + #define phylink_zero(bm) \ bitmap_zero(bm, __ETHTOOL_LINK_MODE_MASK_NBITS) #define __phylink_do_bit(op, bm, mode) \ |