summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUday Raval <uraval@nvidia.com>2010-01-07 10:54:23 -0800
committerUday Raval <uraval@nvidia.com>2010-01-07 11:20:37 -0800
commite9924d3159a369643b489cb07a54da51b11c121c (patch)
treed77797aeaaac0a440694ec515768e2a5ec809b11 /drivers
parent58dd78dcfdcbe2db0ce27620c4c13c836e905289 (diff)
tegra: usbnet workaround for 32Byte buffer allignment requirement
Work-around for Tegra USB EHCI host controller limitation. Outgoing USB network packets must be 32 byte alligned. Bug 631234, 634022, 638227 Change-Id: Iba7be8305037e93df4d47d9b1f63a0907fafded1
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/usbnet.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index fa080e191ddf..056f6d91d226 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -930,6 +930,17 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
struct driver_info *info = dev->driver_info;
unsigned long flags;
+#ifdef CONFIG_ARCH_TEGRA
+ // check and do the proper 32 byte alignment for sk buff
+ if ((int)skb->data & 0x0000001F) {
+ struct sk_buff *new_skb = skb_copy_expand(skb, 32, 0, GFP_ATOMIC);
+ if(unlikely(!(new_skb)))
+ return -1;
+ kfree_skb(skb);
+ skb = new_skb;
+ }
+#endif
+
// some devices want funky USB-level framing, for
// win32 driver (usually) and/or hardware quirks
if (info->tx_fixup) {