openwrt/target/linux/mvebu/patches-4.4/141-net-mvneta-enable-flow-control-for-fixed-connections.patch
Jo-Philipp Wich 7bc25dfa63 mvebu: fix mvneta build with Linux 4.4.110
Kernel 4.4.109 added pp->link, pp->duplex and pp->speed setters to
mvneta_port_disable() which the mvneta patchset failed to patch out after
rebasing, leading to the following build error:

      CC      drivers/net/ethernet/marvell/mvneta.o
    drivers/net/ethernet/marvell/mvneta.c: In function 'mvneta_port_disable':
    drivers/net/ethernet/marvell/mvneta.c:1199:4: error: 'struct mvneta_port' has no member named 'link'
      pp->link = 0;
        ^
    drivers/net/ethernet/marvell/mvneta.c:1200:4: error: 'struct mvneta_port' has no member named 'duplex'
      pp->duplex = -1;
        ^
    drivers/net/ethernet/marvell/mvneta.c:1201:4: error: 'struct mvneta_port' has no member named 'speed'
      pp->speed = 0;
        ^

Fix the issue by rebasing 134-net-mvneta-convert-to-phylink.patch to remove
these struct member accesses as well.

Fixes: 7f5a040359 ("kernel: update kernel 4.4 to version 4.4.110")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-08 14:35:21 +01:00

54 lines
1.7 KiB
Diff

From 4c3e2dc08a11fb1273ca62467f1d06e59866bad3 Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 12 Jul 2016 00:04:13 +0100
Subject: [PATCH 729/744] net: mvneta: enable flow control for fixed
connections
Allow symetric flow control to be enabled for fixed link connections as
well as other types of connections by setting the supported and
advertised capability bits.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/marvell/mvneta.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3114,9 +3114,9 @@ static int mvneta_mac_support(struct net
switch (mode) {
case MLO_AN_8023Z:
state->supported = SUPPORTED_1000baseT_Full |
- SUPPORTED_Autoneg | SUPPORTED_Pause;
+ SUPPORTED_Autoneg;
state->advertising = ADVERTISED_1000baseT_Full |
- ADVERTISED_Autoneg | ADVERTISED_Pause;
+ ADVERTISED_Autoneg;
state->an_enabled = 1;
break;
@@ -3127,18 +3127,21 @@ static int mvneta_mac_support(struct net
state->supported = PHY_10BT_FEATURES |
PHY_100BT_FEATURES |
SUPPORTED_1000baseT_Full |
- SUPPORTED_Pause |
SUPPORTED_Autoneg;
state->advertising = ADVERTISED_10baseT_Half |
ADVERTISED_10baseT_Full |
ADVERTISED_100baseT_Half |
ADVERTISED_100baseT_Full |
ADVERTISED_1000baseT_Full |
- ADVERTISED_Pause |
ADVERTISED_Autoneg;
state->an_enabled = 1;
break;
}
+
+ /* All modes support flow control */
+ state->supported |= SUPPORTED_Pause;
+ state->advertising |= ADVERTISED_Pause;
+
return 0;
}