imx6: fix USB for 4.9 kernel
[oweals/openwrt.git] / target / linux / mvebu / patches-4.4 / 137-net-mvneta-add-nway_reset-support.patch
1 From 244bee2889d08f876c64c335765a8ea6de0f5381 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@arm.linux.org.uk>
3 Date: Thu, 1 Oct 2015 19:40:31 +0100
4 Subject: [PATCH 725/744] net: mvneta: add nway_reset support
5
6 Add ethtool nway_reset support to mvneta via phylink, so that userspace
7 can request the link in whatever mode to be renegotiated via
8 ethtool -r ethX.
9
10 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 ---
12  drivers/net/ethernet/marvell/mvneta.c | 8 ++++++++
13  1 file changed, 8 insertions(+)
14
15 --- a/drivers/net/ethernet/marvell/mvneta.c
16 +++ b/drivers/net/ethernet/marvell/mvneta.c
17 @@ -3589,6 +3589,13 @@ int mvneta_ethtool_set_settings(struct n
18         return phylink_ethtool_set_settings(pp->phylink, cmd);
19  }
20  
21 +static int mvneta_ethtool_nway_reset(struct net_device *dev)
22 +{
23 +       struct mvneta_port *pp = netdev_priv(dev);
24 +
25 +       return phylink_ethtool_nway_reset(pp->phylink);
26 +}
27 +
28  /* Set interrupt coalescing for ethtools */
29  static int mvneta_ethtool_set_coalesce(struct net_device *dev,
30                                        struct ethtool_coalesce *c)
31 @@ -3853,6 +3860,7 @@ const struct ethtool_ops mvneta_eth_tool
32         .get_link       = ethtool_op_get_link,
33         .get_settings   = mvneta_ethtool_get_settings,
34         .set_settings   = mvneta_ethtool_set_settings,
35 +       .nway_reset     = mvneta_ethtool_nway_reset,
36         .set_coalesce   = mvneta_ethtool_set_coalesce,
37         .get_coalesce   = mvneta_ethtool_get_coalesce,
38         .get_drvinfo    = mvneta_ethtool_get_drvinfo,