diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-02-06 11:46:48 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-02-16 17:17:15 +0100 |
commit | 2bf9ea6a31736db059aa97addce3a34b933dacc1 (patch) | |
tree | ecfe628aabaf38e6bd40ca841443d19079105a83 /target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch | |
parent | 237454991618e0e8b7ceb8a8a2a43fca12c1a454 (diff) | |
download | mtk-20170518-2bf9ea6a31736db059aa97addce3a34b933dacc1.zip mtk-20170518-2bf9ea6a31736db059aa97addce3a34b933dacc1.tar.gz mtk-20170518-2bf9ea6a31736db059aa97addce3a34b933dacc1.tar.bz2 |
mvebu: add linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch')
-rw-r--r-- | target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch b/target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch new file mode 100644 index 0000000..d4436a7 --- /dev/null +++ b/target/linux/mvebu/patches-4.9/421-phylink-add-ethtool-nway_reset-support.patch @@ -0,0 +1,44 @@ +From: Russell King <rmk+kernel@arm.linux.org.uk> +Date: Thu, 1 Oct 2015 20:27:19 +0100 +Subject: [PATCH] phylink: add ethtool nway_reset support + +Add ethtool nway_reset support to phylink, to allow userspace to +request a re-negotiation of the link. + +Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +--- + +--- a/drivers/net/phy/phylink.c ++++ b/drivers/net/phy/phylink.c +@@ -783,6 +783,20 @@ int phylink_ethtool_ksettings_set(struct + } + EXPORT_SYMBOL_GPL(phylink_ethtool_ksettings_set); + ++int phylink_ethtool_nway_reset(struct phylink *pl) ++{ ++ int ret = 0; ++ ++ mutex_lock(&pl->config_mutex); ++ if (pl->phydev) ++ ret = genphy_restart_aneg(pl->phydev); ++ phylink_mac_an_restart(pl); ++ mutex_unlock(&pl->config_mutex); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(phylink_ethtool_nway_reset); ++ + /* This emulates MII registers for a fixed-mode phy operating as per the + * passed in state. "aneg" defines if we report negotiation is possible. + * +--- a/include/linux/phylink.h ++++ b/include/linux/phylink.h +@@ -86,6 +86,7 @@ int phylink_ethtool_ksettings_get(struct + struct ethtool_link_ksettings *); + int phylink_ethtool_ksettings_set(struct phylink *, + const struct ethtool_link_ksettings *); ++int phylink_ethtool_nway_reset(struct phylink *); + int phylink_mii_ioctl(struct phylink *, struct ifreq *, int); + + int phylink_set_link(struct phylink *pl, unsigned int mode, u8 port, |