From 5d0b94c1349677fa3b6ed53c8f4fc83d3121b2ca Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 3 Nov 2020 14:54:39 +0100 Subject: [PATCH 01/10] Fix version --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5539da02..541348fc 100755 --- a/build.sh +++ b/build.sh @@ -172,7 +172,7 @@ if [ -f "$OMR_TARGET_CONFIG" ]; then CONFIG_VERSIONOPT=y CONFIG_VERSION_DIST="$OMR_DIST" CONFIG_VERSION_REPO="$OMR_REPO" - CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)-$(git -C "$OMR_FEED" rev-parse --short HEAD)" + CONFIG_VERSION_NUMBER="$(git -C "$OMR_FEED" tag --sort=committerdate | tail -1)" EOF else cat config -> "$OMR_TARGET/source/.config" <<-EOF From c198fe13df7a966b8cd3b70b917a01f9783d7683 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 3 Nov 2020 15:23:57 +0100 Subject: [PATCH 02/10] Patch to fix partially ring expansion failed issue --- ...xhci-quirks-add-link-TRB-quirk-VL805.patch | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch diff --git a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch new file mode 100644 index 00000000..0cceec21 --- /dev/null +++ b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch @@ -0,0 +1,67 @@ +From 5d9d9ba7547ad27d76dd36791f54a57ff555ff8a Mon Sep 17 00:00:00 2001 +From: Jonathan Bell +Date: Mon, 26 Oct 2020 14:03:35 +0000 +Subject: [PATCH] xhci: quirks: add link TRB quirk for VL805 + +The VL805 controller can't cope with the TR Dequeue Pointer for an endpoint +being set to a Link TRB. The hardware-maintained endpoint context ends up +stuck at the address of the Link TRB, leading to erroneous ring expansion +events whenever the enqueue pointer wraps to the dequeue position. + +If the search for the end of the current TD and ring cycle state lands on +a Link TRB, move to the next segment. + +See: https://github.com/raspberrypi/linux/issues/3919 + +Signed-off-by: Jonathan Bell +--- + drivers/usb/host/xhci-pci.c | 1 + + drivers/usb/host/xhci-ring.c | 10 ++++++++++ + drivers/usb/host/xhci.h | 1 + + 3 files changed, 12 insertions(+) + +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c +index 5238fa29ea978..b975e6803d485 100644 +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -251,6 +251,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) + pdev->device == 0x3483) { + xhci->quirks |= XHCI_LPM_SUPPORT; + xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; ++ xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; + } + + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c +index d99e636f3844c..8149abff857c2 100644 +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, + + } while (!cycle_found || !td_last_trb_found); + ++ /* ++ * Quirk: the xHC does not correctly parse link TRBs if the HW Dequeue ++ * pointer is set to one. Advance to the next TRB (and next segment). ++ */ ++ if (xhci->quirks & XHCI_AVOID_DQ_ON_LINK && trb_is_link(new_deq)) { ++ if (link_trb_toggles_cycle(new_deq)) ++ state->new_cycle_state ^= 0x1; ++ next_trb(xhci, ep_ring, &new_seg, &new_deq); ++ } ++ + state->new_deq_seg = new_seg; + state->new_deq_ptr = new_deq; + +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h +index 2033bb8683033..90ccc71231c1a 100644 +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -1874,6 +1874,7 @@ struct xhci_hcd { + #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) + #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) + #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) ++#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(37) + + unsigned int num_active_eps; + unsigned int limit_active_eps; From 00d72293b3f1aff6914ef22eb7a55a292b99f0ad Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 10 Nov 2020 16:17:01 +0100 Subject: [PATCH 03/10] Add xargs parallel support in busybox --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index b45b6c96..cb08855c 100644 --- a/config +++ b/config @@ -25,6 +25,7 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_USE_TERMIOS=y CONFIG_BUSYBOX_CONFIG_FEATURE_VI_UNDO=y CONFIG_BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE=y CONFIG_BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=32 +CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL=y CONFIG_BUSYBOX_CONFIG_IOSTAT=y CONFIG_BUSYBOX_CONFIG_LOADKMAP=y CONFIG_BUSYBOX_CONFIG_LSPCI=y From c43b1c0e9d01812ff07bcd8f22d8508ab50eec5a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 16 Nov 2020 15:56:08 +0100 Subject: [PATCH 04/10] BPI-R2: Remove second gmac --- .../0100-dts-add-second-gmac.patch | 54 ------------------- .../patches-5.4/0999-lan-to-wan.patch | 20 ++----- 2 files changed, 3 insertions(+), 71 deletions(-) delete mode 100644 root/target/linux/mediatek/patches-5.4/0100-dts-add-second-gmac.patch diff --git a/root/target/linux/mediatek/patches-5.4/0100-dts-add-second-gmac.patch b/root/target/linux/mediatek/patches-5.4/0100-dts-add-second-gmac.patch deleted file mode 100644 index d985a929..00000000 --- a/root/target/linux/mediatek/patches-5.4/0100-dts-add-second-gmac.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 97fdec52fff8079d3af104e8723602a3cb9d2a11 Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Thu, 20 Jun 2019 23:06:41 +0200 -Subject: [PATCH] net: dts: add second gmac for bananapi r2 - ---- - arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -index 2b760f90f38c..fad09608b86c 100644 ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -@@ -143,13 +143,25 @@ - }; - }; - -+ gmac1: mac@1 { -+ compatible = "mediatek,eth-mac"; -+ reg = <1>; -+ label = "wan"; -+ phy-mode = "rgmii"; -+ phy-handle = <&ephy0>; -+ }; -+ - mdio: mdio-bus { - #address-cells = <1>; - #size-cells = <0>; - -- switch@0 { -- compatible = "mediatek,mt7530"; -+ ephy0: ethernet-phy@0 { - reg = <0>; -+ }; -+ -+ switch@1f { -+ compatible = "mediatek,mt7530"; -+ reg = <0x1f>; - reset-gpios = <&pio 33 0>; - core-supply = <&mt6323_vpa_reg>; - io-supply = <&mt6323_vemc3v3_reg>; -@@ -158,10 +170,12 @@ - #address-cells = <1>; - #size-cells = <0>; - -+/* Disabled, is now handled by gmac1 (eth1/wan) via phy-handle! - port@0 { - reg = <0>; - label = "wan"; - }; -+*/ - - port@1 { - reg = <1>; diff --git a/root/target/linux/mediatek/patches-5.4/0999-lan-to-wan.patch b/root/target/linux/mediatek/patches-5.4/0999-lan-to-wan.patch index d780caba..65a2246b 100644 --- a/root/target/linux/mediatek/patches-5.4/0999-lan-to-wan.patch +++ b/root/target/linux/mediatek/patches-5.4/0999-lan-to-wan.patch @@ -1,26 +1,12 @@ ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2020-04-19 11:02:56.505715879 +0200 -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2020-04-19 11:03:53.620780390 +0200 -@@ -196,7 +196,7 @@ - gmac1: mac@1 { - compatible = "mediatek,eth-mac"; - reg = <1>; -- label = "wan"; -+ label = "lan"; - phy-mode = "rgmii"; - phy-handle = <&ephy0>; - local-mac-address = [00 0a 35 00 00 02]; -@@ -221,31 +221,31 @@ - #address-cells = <1>; - #size-cells = <0>; +--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts.anc 2020-11-16 15:48:00.852410183 +0100 ++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2020-11-16 15:49:23.878965822 +0100 +@@ -210,27 +210,27 @@ --/* Disabled, is now handled by gmac1 (eth1/wan) via phy-handle! -+/* Disabled, is now handled by gmac1 (eth1/lan) via phy-handle! port@0 { reg = <0>; - label = "wan"; + label = "lan"; }; - */ port@1 { reg = <1>; From b5213550eba36f7eb812f8f61a01050b0671f181 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 16 Nov 2020 15:56:43 +0100 Subject: [PATCH 05/10] Add missing pause for CPU, fix iperf test --- .../0998-mt7623-add-missing-pause.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch diff --git a/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch b/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch new file mode 100644 index 00000000..8982c7ab --- /dev/null +++ b/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch @@ -0,0 +1,32 @@ +From 0808ca98e67e914ac48cc8f11910509d3b04379c Mon Sep 17 00:00:00 2001 +From: Frank Wunderlich +Date: Mon, 7 Sep 2020 09:05:17 +0200 +Subject: [PATCH] arm: dts: mt7623: add missing pause for switchport + +commit 36f0a5fc5284838c544218666c63ee8cfa46a9c3 upstream. + +port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option +which causes rx drops on running iperf. + +Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") +Signed-off-by: Frank Wunderlich +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20200907070517.51715-1-linux@fw-web.de +Signed-off-by: Matthias Brugger +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +index 2b760f90f38c..5375c6699843 100644 +--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts ++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +@@ -192,6 +192,7 @@ + fixed-link { + speed = <1000>; + full-duplex; ++ pause; + }; + }; + }; From 4726683899eff450deef59aae053451fbb227535 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 19 Nov 2020 17:13:19 +0100 Subject: [PATCH 06/10] Update OpenWrt --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 541348fc..e9ad5dc4 100755 --- a/build.sh +++ b/build.sh @@ -78,9 +78,9 @@ fi #_get_repo source https://github.com/ysurac/openmptcprouter-source "master" if [ "$OMR_OPENWRT" = "default" ]; then - _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "a439f1bb478b4b8b4134dbed76266c0032625b6b" - _get_repo feeds/packages https://github.com/openwrt/packages "05769970213a5f9ffb81506b18da288890c05949" - _get_repo feeds/luci https://github.com/openwrt/luci "a805a3178f902fe609d3d4a6c7b6b5b1dad88838" + _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "7330348f2dbd9f01786041b726837aa393e3ce34" + _get_repo feeds/packages https://github.com/openwrt/packages "78dd3e05a8e4be0625bade05eb1831cb319df34c" + _get_repo feeds/luci https://github.com/openwrt/luci "ceae469a193d54103820d2bf1f599b8f0a26c363" elif [ "$OMR_OPENWRT" = "master" ]; then _get_repo "$OMR_TARGET/source" https://github.com/openwrt/openwrt "master" _get_repo feeds/packages https://github.com/openwrt/packages "master" From 6a023e182c69c16d8e513f9d29e467553d578950 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 19 Nov 2020 17:13:37 +0100 Subject: [PATCH 07/10] Update MPTCP patch for latest kernel --- root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch b/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch index dfb008e1..8c75bb7c 100644 --- a/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch +++ b/root/target/linux/generic/hack-5.4/690-mptcp_trunk.patch @@ -4592,12 +4592,13 @@ diff -aurN linux-5.4.64/net/ipv4/tcp_input.c linux-5.4.64.mptcp/net/ipv4/tcp_inp { int eaten; struct sk_buff *tail = skb_peek_tail(&sk->sk_receive_queue); -@@ -4774,7 +4838,7 @@ +@@ -4774,8 +4838,8 @@ int avail = tp->rcv_nxt - tp->copied_seq; if (avail < sk->sk_rcvlowat && !tcp_rmem_pressure(sk) && -- !sock_flag(sk, SOCK_DONE)) -+ !sock_flag(sk, SOCK_DONE) && !mptcp(tp)) +- !sock_flag(sk, SOCK_DONE) && ++ !sock_flag(sk, SOCK_DONE) && !mptcp(tp) && + tcp_receive_window(tp) > inet_csk(sk)->icsk_ack.rcv_mss) return; sk->sk_data_ready(sk); From e995c784680435c338d3ab30e60637641460be11 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 19 Nov 2020 17:13:56 +0100 Subject: [PATCH 08/10] Update luci lang patch for latest luci update --- patches/luci-occitan.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/luci-occitan.patch b/patches/luci-occitan.patch index 4aba6102..8d3355e2 100644 --- a/patches/luci-occitan.patch +++ b/patches/luci-occitan.patch @@ -1,9 +1,9 @@ --- a/feeds/luci/luci.mk 2020-10-13 09:58:19.887513368 +0200 +++ b/feeds/luci/luci.mk 2020-10-13 09:04:51.724277184 +0200 @@ -34,6 +34,7 @@ - LUCI_LANG.mr=Marāṭhī (Marathi) LUCI_LANG.ms=Bahasa Melayu (Malay) LUCI_LANG.nb_NO=Norsk (Norwegian) + LUCI_LANG.nl=Nederlands (Dutch) +LUCI_LANG.oc=Occitan LUCI_LANG.pl=Polski (Polish) LUCI_LANG.pt_BR=Português do Brasil (Brazilian Portuguese) From 72f2e51c9852e2e33474ef7308c1cbe16937ca55 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 20 Nov 2020 11:58:51 +0100 Subject: [PATCH 09/10] Fix RPI patch --- .../patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch index 0cceec21..b4455122 100644 --- a/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch +++ b/root/target/linux/bcm27xx/patches-5.4/990-xhci-quirks-add-link-TRB-quirk-VL805.patch @@ -57,11 +57,12 @@ diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 2033bb8683033..90ccc71231c1a 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1874,6 +1874,7 @@ struct xhci_hcd { +@@ -1874,7 +1874,8 @@ struct xhci_hcd { #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) #define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) +#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(37) + #define XHCI_DISABLE_SPARSE BIT_ULL(38) unsigned int num_active_eps; unsigned int limit_active_eps; From 9d7055bac6e683dc303e49ea2a81774397718133 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 20 Nov 2020 15:10:17 +0100 Subject: [PATCH 10/10] Remove patch already applied upstream --- .../0998-mt7623-add-missing-pause.patch | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch diff --git a/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch b/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch deleted file mode 100644 index 8982c7ab..00000000 --- a/root/target/linux/mediatek/patches-5.4/0998-mt7623-add-missing-pause.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0808ca98e67e914ac48cc8f11910509d3b04379c Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Mon, 7 Sep 2020 09:05:17 +0200 -Subject: [PATCH] arm: dts: mt7623: add missing pause for switchport - -commit 36f0a5fc5284838c544218666c63ee8cfa46a9c3 upstream. - -port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option -which causes rx drops on running iperf. - -Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") -Signed-off-by: Frank Wunderlich -Cc: stable@vger.kernel.org -Link: https://lore.kernel.org/r/20200907070517.51715-1-linux@fw-web.de -Signed-off-by: Matthias Brugger -Signed-off-by: Greg Kroah-Hartman ---- - arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -index 2b760f90f38c..5375c6699843 100644 ---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts -@@ -192,6 +192,7 @@ - fixed-link { - speed = <1000>; - full-duplex; -+ pause; - }; - }; - };