summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-09-24 11:01:13 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-05-05 18:42:38 +0100
commitaad12dc40c1b56d5874be52696cbf6d78133213b (patch)
treef31bc00fe99159602f07b12c7676748dc0ad0bdd /include
parentc5aaabb9e8722b8cbee2d0a4a049e1bcdc752255 (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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index e33a7d1d7625..62786d27a5fc 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -125,6 +125,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) \