arm64: Switch to 4.9 kernel
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.4 / 141-net-mvneta-enable-flow-control-for-fixed-connections.patch
1 From 4c3e2dc08a11fb1273ca62467f1d06e59866bad3 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Tue, 12 Jul 2016 00:04:13 +0100
4 Subject: [PATCH 729/744] net: mvneta: enable flow control for fixed
5 connections
6
7 Allow symetric flow control to be enabled for fixed link connections as
8 well as other types of connections by setting the supported and
9 advertised capability bits.
10
11 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
12 ---
13 drivers/net/ethernet/marvell/mvneta.c | 11 +++++++----
14 1 file changed, 7 insertions(+), 4 deletions(-)
15
16 --- a/drivers/net/ethernet/marvell/mvneta.c
17 +++ b/drivers/net/ethernet/marvell/mvneta.c
18 @@ -3114,9 +3114,9 @@ static int mvneta_mac_support(struct net
19 switch (mode) {
20 case MLO_AN_8023Z:
21 state->supported = SUPPORTED_1000baseT_Full |
22 - SUPPORTED_Autoneg | SUPPORTED_Pause;
23 + SUPPORTED_Autoneg;
24 state->advertising = ADVERTISED_1000baseT_Full |
25 - ADVERTISED_Autoneg | ADVERTISED_Pause;
26 + ADVERTISED_Autoneg;
27 state->an_enabled = 1;
28 break;
29
30 @@ -3127,18 +3127,21 @@ static int mvneta_mac_support(struct net
31 state->supported = PHY_10BT_FEATURES |
32 PHY_100BT_FEATURES |
33 SUPPORTED_1000baseT_Full |
34 - SUPPORTED_Pause |
35 SUPPORTED_Autoneg;
36 state->advertising = ADVERTISED_10baseT_Half |
37 ADVERTISED_10baseT_Full |
38 ADVERTISED_100baseT_Half |
39 ADVERTISED_100baseT_Full |
40 ADVERTISED_1000baseT_Full |
41 - ADVERTISED_Pause |
42 ADVERTISED_Autoneg;
43 state->an_enabled = 1;
44 break;
45 }
46 +
47 + /* All modes support flow control */
48 + state->supported |= SUPPORTED_Pause;
49 + state->advertising |= ADVERTISED_Pause;
50 +
51 return 0;
52 }
53