From 8299d1f057439f94c6a4412e2e5c5082b82a30c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 21 Aug 2021 10:54:34 +0200 Subject: bcm27xx: add kernel 5.10 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas --- ...78xx-Disable-TCP-Segmentation-Offload-TSO.patch | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.10/950-0082-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch (limited to 'target/linux/bcm27xx/patches-5.10/950-0082-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch') diff --git a/target/linux/bcm27xx/patches-5.10/950-0082-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch b/target/linux/bcm27xx/patches-5.10/950-0082-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch new file mode 100644 index 0000000000..232e4d4336 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.10/950-0082-net-lan78xx-Disable-TCP-Segmentation-Offload-TSO.patch @@ -0,0 +1,56 @@ +From 42606db546588b0e0b8084466b9b31ec111640a4 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 13 Jun 2018 15:21:10 +0100 +Subject: [PATCH] net: lan78xx: Disable TCP Segmentation Offload (TSO) + +TSO seems to be having issues when packets are dropped and the +remote end uses Selective Acknowledge (SACK) to denote that +data is missing. The missing data is never resent, so the +connection eventually stalls. + +There is a module parameter of enable_tso added to allow +further debugging without forcing a rebuild of the kernel. + +https://github.com/raspberrypi/linux/issues/2449 +https://github.com/raspberrypi/linux/issues/2482 + +Signed-off-by: Dave Stevenson +--- + drivers/net/usb/lan78xx.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +--- a/drivers/net/usb/lan78xx.c ++++ b/drivers/net/usb/lan78xx.c +@@ -425,6 +425,15 @@ static int msg_level = -1; + module_param(msg_level, int, 0); + MODULE_PARM_DESC(msg_level, "Override default message level"); + ++/* TSO seems to be having some issue with Selective Acknowledge (SACK) that ++ * results in lost data never being retransmitted. ++ * Disable it by default now, but adds a module parameter to enable it for ++ * debug purposes (the full cause is not currently understood). ++ */ ++static bool enable_tso; ++module_param(enable_tso, bool, 0644); ++MODULE_PARM_DESC(enable_tso, "Enables TCP segmentation offload"); ++ + static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data) + { + u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL); +@@ -2917,8 +2926,14 @@ static int lan78xx_bind(struct lan78xx_n + if (DEFAULT_RX_CSUM_ENABLE) + dev->net->features |= NETIF_F_RXCSUM; + +- if (DEFAULT_TSO_CSUM_ENABLE) +- dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG; ++ if (DEFAULT_TSO_CSUM_ENABLE) { ++ dev->net->features |= NETIF_F_SG; ++ /* Use module parameter to control TCP segmentation offload as ++ * it appears to cause issues. ++ */ ++ if (enable_tso) ++ dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6; ++ } + + if (DEFAULT_VLAN_RX_OFFLOAD) + dev->net->features |= NETIF_F_HW_VLAN_CTAG_RX; -- cgit v1.2.3