summary'>refs'>log'>treecommitdiff'>stats
path: '>root//'>sys-kernel/boest-v5.0.15//'>raspberrypi//0003-smsx95xx-fix-crimes-against-truesize.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/boest-v5.0.15/raspberrypi/0003-smsx95xx-fix-crimes-against-truesize.patch')
-rw-r--r--sys-kernel/boest-v5.0.15/raspberrypi/0003-smsx95xx-fix-crimes-against-truesize.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/sys-kernel/boest-v5.0.15/raspberrypi/0003-smsx95xx-fix-crimes-against-truesize.patch b/sys-kernel/boest-v5.0.15/raspberrypi/0003-smsx95xx-fix-crimes-against-truesize.patch
new file mode 100644
index 00000000..c09e647f
--- /dev/null
+++ b/sys-kernel/boest-v5.0.15/raspberrypi/0003-smsx95xx-fix-crimes-against-truesize.patch
@@ -0,0 +1,49 @@
+From 121d960ff17822ed42284502e400efa31b3a13ad 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 003/194] 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(-)
+
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
+index e3d08626828e..3d6276566a13 100644
+--- a/drivers/net/usb/smsc95xx.c
++++ b/drivers/net/usb/smsc95xx.c
+@@ -82,6 +82,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, int in_pm)
+ {
+@@ -1969,7 +1973,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ 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;
+ }
+@@ -1987,7 +1992,8 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ 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);
+ }