diff options
author | Alexey Brodkin <Alexey.Brodkin@synopsys.com> | 2016-08-24 15:44:04 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-08-24 15:16:01 +0200 |
commit | 66f3edfd8baaf92133df251656118e70edcd59b9 (patch) | |
tree | d4ed8eedbf594a450aab484c67f7b448e2d5e0b9 | |
parent | 2b0a1292f84ce17363eea0da3051cb9268cd98a6 (diff) | |
download | upstream-66f3edfd8baaf92133df251656118e70edcd59b9.tar.gz upstream-66f3edfd8baaf92133df251656118e70edcd59b9.tar.bz2 upstream-66f3edfd8baaf92133df251656118e70edcd59b9.zip |
linux/arc*: disable MAC frame filter in DW GMAC
DW GMAC on ARC SDP boards doesn't enter promiscuous mode if
Ethernet PHY haven't got established link. Good examples are
auto-negotiation in progress or disconnected cable.
We do see Linux kernel sets GMAC's MAC filter register
properly but GMAC's hardware doesn't accept new settings.
We believe it is a hardware issue, most probably problem of
integration of DW GMAC and PHY on the board.
As a work-around we completely disable frame filtering
in GMAC hardware (once and for good) which forces GMAC to enter
promiscuous mode with the first write to MAC filter register.
That gives us working bridge that consists of eth0 and wlan0
(USB Wi-Fi dongle). I.e. we finally have working "Dumb AP" setup made
of ARC AXS10x boards.
Given that hack is quite dirty (in loaded wired networks this will
effectively load CPU with junk packets even if user doesn't need promisc
mode) and there's no indication any other boards with DW GMAC suffer
from the same issue we're patching only kernel for ARC boards.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>,
Cc: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | target/linux/arc770/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch | 36 | ||||
-rw-r--r-- | target/linux/archs38/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/target/linux/arc770/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch b/target/linux/arc770/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch new file mode 100644 index 0000000000..1c79ed238c --- /dev/null +++ b/target/linux/arc770/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch @@ -0,0 +1,36 @@ +From 0031b9011cb2b2b1de4dbb4f9620303aec760db4 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin <abrodkin@synopsys.com> +Date: Wed, 27 Jul 2016 11:33:14 +0300 +Subject: [PATCH] stmmac: Disable frame filtering completely + +For some [still unknown] reason in ARC SDP boards +DW GMAC doesn't enter promiscuous mode if eth0 gets +added to the br-lan interface before Ethernet PHY finishes +autonegotiation (PHY gets reset on DW GMAC start). + +As a work-around we completely disable frame filtering +in GMAC hardware which gives us working bridge that consists +of eth0 and wlan0 (USB Wi-Fi dongle). I.e. we finally have +working "Dumb AP" setup made of ARC AXS10x boards. + +Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> +--- + drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +index 623c6ed..6396b81 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/common.h ++++ b/drivers/net/ethernet/stmicro/stmmac/common.h +@@ -42,7 +42,7 @@ + #define DWMAC_CORE_3_50 0x35 + + #undef FRAME_FILTER_DEBUG +-/* #define FRAME_FILTER_DEBUG */ ++#define FRAME_FILTER_DEBUG + + /* Extra statistic and debug information exposed by ethtool */ + struct stmmac_extra_stats { +-- +2.7.4 + diff --git a/target/linux/archs38/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch b/target/linux/archs38/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch new file mode 100644 index 0000000000..1c79ed238c --- /dev/null +++ b/target/linux/archs38/patches-4.4/700-stmmac-Disable-frame-filtering-completely.patch @@ -0,0 +1,36 @@ +From 0031b9011cb2b2b1de4dbb4f9620303aec760db4 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin <abrodkin@synopsys.com> +Date: Wed, 27 Jul 2016 11:33:14 +0300 +Subject: [PATCH] stmmac: Disable frame filtering completely + +For some [still unknown] reason in ARC SDP boards +DW GMAC doesn't enter promiscuous mode if eth0 gets +added to the br-lan interface before Ethernet PHY finishes +autonegotiation (PHY gets reset on DW GMAC start). + +As a work-around we completely disable frame filtering +in GMAC hardware which gives us working bridge that consists +of eth0 and wlan0 (USB Wi-Fi dongle). I.e. we finally have +working "Dumb AP" setup made of ARC AXS10x boards. + +Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> +--- + drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +index 623c6ed..6396b81 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/common.h ++++ b/drivers/net/ethernet/stmicro/stmmac/common.h +@@ -42,7 +42,7 @@ + #define DWMAC_CORE_3_50 0x35 + + #undef FRAME_FILTER_DEBUG +-/* #define FRAME_FILTER_DEBUG */ ++#define FRAME_FILTER_DEBUG + + /* Extra statistic and debug information exposed by ethtool */ + struct stmmac_extra_stats { +-- +2.7.4 + |