diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-07-09 20:32:28 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-07-14 12:44:14 +0200 |
commit | 42954857190b9df16d9d873ecc7f6cc38e013e44 (patch) | |
tree | 98c588f629ff534d458eb0884782ea99672d7634 /target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch | |
parent | f1875e902d0afb7d9b9e5285b4fd8da7f6c5e30a (diff) | |
download | upstream-42954857190b9df16d9d873ecc7f6cc38e013e44.tar.gz upstream-42954857190b9df16d9d873ecc7f6cc38e013e44.tar.bz2 upstream-42954857190b9df16d9d873ecc7f6cc38e013e44.zip |
brcm2708: add linux 4.19 support
Boot tested on Raspberry Pi B+ (BCM2708) and Raspberry Pi 2 (BCM2709)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch b/target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch new file mode 100644 index 0000000000..08532bda58 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0497-Revert-smsc95xx-dynamically-fix-up-TX-buffer-alignme.patch @@ -0,0 +1,60 @@ +From fb13c1342c81bb0c06afdcfe1e8561e8a6e149d7 Mon Sep 17 00:00:00 2001 +From: P33M <p33m@github.com> +Date: Tue, 14 May 2019 14:55:19 +0100 +Subject: [PATCH 497/703] Revert "smsc95xx: dynamically fix up TX buffer + alignment with padding bytes" + +As reported in https://github.com/raspberrypi/linux/issues/2964 this +commit causes a regression corrupting non-option TCP ack packets. + +This reverts commit 96b972dc736d943f371a16ccca452a053d83c65b. +--- + drivers/net/usb/smsc95xx.c | 12 +++++------- + drivers/net/usb/smsc95xx.h | 2 +- + 2 files changed, 6 insertions(+), 8 deletions(-) + +--- a/drivers/net/usb/smsc95xx.c ++++ b/drivers/net/usb/smsc95xx.c +@@ -2082,9 +2082,7 @@ static struct sk_buff *smsc95xx_tx_fixup + struct sk_buff *skb, gfp_t flags) + { + bool csum = skb->ip_summed == CHECKSUM_PARTIAL; +- unsigned int align_bytes = -((uintptr_t)skb->data) & 0x3; +- int overhead = csum ? SMSC95XX_TX_OVERHEAD_CSUM + align_bytes +- : SMSC95XX_TX_OVERHEAD + align_bytes; ++ int overhead = csum ? SMSC95XX_TX_OVERHEAD_CSUM : SMSC95XX_TX_OVERHEAD; + u32 tx_cmd_a, tx_cmd_b; + + /* We do not advertise SG, so skbs should be already linearized */ +@@ -2118,16 +2116,16 @@ static struct sk_buff *smsc95xx_tx_fixup + } + } + +- skb_push(skb, 4 + align_bytes); +- tx_cmd_b = (u32)(skb->len - 4 - align_bytes); ++ skb_push(skb, 4); ++ tx_cmd_b = (u32)(skb->len - 4); + if (csum) + tx_cmd_b |= TX_CMD_B_CSUM_ENABLE; + cpu_to_le32s(&tx_cmd_b); + memcpy(skb->data, &tx_cmd_b, 4); + + skb_push(skb, 4); +- tx_cmd_a = (u32)(skb->len - 8 - align_bytes) | TX_CMD_A_FIRST_SEG_ | +- (align_bytes << 16) | TX_CMD_A_LAST_SEG_; ++ tx_cmd_a = (u32)(skb->len - 8) | TX_CMD_A_FIRST_SEG_ | ++ TX_CMD_A_LAST_SEG_; + cpu_to_le32s(&tx_cmd_a); + memcpy(skb->data, &tx_cmd_a, 4); + +--- a/drivers/net/usb/smsc95xx.h ++++ b/drivers/net/usb/smsc95xx.h +@@ -21,7 +21,7 @@ + #define _SMSC95XX_H + + /* Tx command words */ +-#define TX_CMD_A_DATA_OFFSET_ (0x00030000) /* Data Start Offset */ ++#define TX_CMD_A_DATA_OFFSET_ (0x001F0000) /* Data Start Offset */ + #define TX_CMD_A_FIRST_SEG_ (0x00002000) /* First Segment */ + #define TX_CMD_A_LAST_SEG_ (0x00001000) /* Last Segment */ + #define TX_CMD_A_BUF_SIZE_ (0x000007FF) /* Buffer Size */ |