mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
7285f7744f
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.61 Removed upstreamed: generic/backport-6.1/814-v6.6-0018-nvmem-imx-correct-nregs-for-i.MX6SLL.patch[1] generic/backport-6.1/814-v6.6-0019-nvmem-imx-correct-nregs-for-i.MX6UL.patch[2] generic/backport-6.1/814-v6.6-0020-nvmem-imx-correct-nregs-for-i.MX6ULL.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=b90b8633ef62314f3a5f5675106e6dcdec981b6f 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=37495846b1efc23c1767b17ddd6645cc0ccb9946 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=116671d25915b913374ccdb2956b5fdaff939dc9 Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
From 648c906a27d3713f589717f4be36583fc64f2ba1 Mon Sep 17 00:00:00 2001
|
|
From: Steve Glendinning <steve.glendinning@smsc.com>
|
|
Date: Thu, 19 Feb 2015 18:47:12 +0000
|
|
Subject: [PATCH] smsx95xx: fix crimes against truesize
|
|
|
|
smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings.
|
|
|
|
This patch stops smsc95xx from changing truesize.
|
|
|
|
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
|
---
|
|
drivers/net/usb/smsc95xx.c | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/usb/smsc95xx.c
|
|
+++ b/drivers/net/usb/smsc95xx.c
|
|
@@ -79,6 +79,10 @@ static bool turbo_mode = true;
|
|
module_param(turbo_mode, bool, 0644);
|
|
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
|
|
|
|
+static bool truesize_mode = false;
|
|
+module_param(truesize_mode, bool, 0644);
|
|
+MODULE_PARM_DESC(truesize_mode, "Report larger truesize value");
|
|
+
|
|
static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
|
u32 *data)
|
|
{
|
|
@@ -1870,7 +1874,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
|
if (dev->net->features & NETIF_F_RXCSUM)
|
|
smsc95xx_rx_csum_offload(skb);
|
|
skb_trim(skb, skb->len - 4); /* remove fcs */
|
|
- skb->truesize = size + sizeof(struct sk_buff);
|
|
+ if (truesize_mode)
|
|
+ skb->truesize = size + sizeof(struct sk_buff);
|
|
|
|
return 1;
|
|
}
|
|
@@ -1888,7 +1893,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
|
if (dev->net->features & NETIF_F_RXCSUM)
|
|
smsc95xx_rx_csum_offload(ax_skb);
|
|
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
|
- ax_skb->truesize = size + sizeof(struct sk_buff);
|
|
+ if (truesize_mode)
|
|
+ ax_skb->truesize = size + sizeof(struct sk_buff);
|
|
|
|
usbnet_skb_return(dev, ax_skb);
|
|
}
|