[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B7433@saturn3.aculab.com>
Date: Tue, 19 Nov 2013 13:56:43 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Mark Lord" <mlord@...ox.com>,
"Eric Dumazet" <eric.dumazet@...il.com>,
"Ming Lei" <ming.lei@...onical.com>, <davem@...emloft.net>,
<netdev@...r.kernel.org>
Subject: RE: net/usb/ax88179_178a driver broken in linux-3.12
> From: Mark Lord [mailto:mlord@...ox.com]
> On 13-11-19 05:04 AM, David Laight wrote:
> >
> > Which changes did you revert?
>
> Just the bits that changed how the headroom/tailroom sizes
> were checked and adjusted. See attachment for the revert patch
> I am using here. My mailer unfortunately likes to mangle inline patches.
>
> =========snip===========
> Revert USB 3.0 network driver changes that break the adapter (lockups)
> in 3.12. This just puts back the original code from previous kernels.
>
> Signed-off-by: Mark Lord <mlord@...ox.com>
>
> --- linux/drivers/net/usb/ax88179_178a.c.orig 2013-11-03 18:41:51.000000000 -0500
> +++ linux/drivers/net/usb/ax88179_178a.c 2013-11-17 13:23:39.525734277 -0500
> @@ -1177,18 +1177,31 @@
> int frame_size = dev->maxpacket;
> int mss = skb_shinfo(skb)->gso_size;
> int headroom;
> + int tailroom;
>
> tx_hdr1 = skb->len;
> tx_hdr2 = mss;
> if (((skb->len + 8) % frame_size) == 0)
> tx_hdr2 |= 0x80008000; /* Enable padding */
>
> - headroom = skb_headroom(skb) - 8;
> + headroom = skb_headroom(skb);
> + tailroom = skb_tailroom(skb);
>
> - if ((skb_header_cloned(skb) || headroom < 0) &&
> - pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
> + if (!skb_header_cloned(skb) &&
> + !skb_cloned(skb) &&
> + (headroom + tailroom) >= 8) {
> + if (headroom < 8) {
> + skb->data = memmove(skb->head + 8, skb->data, skb->len);
> + skb_set_tail_pointer(skb, skb->len);
> + }
> + } else {
> + struct sk_buff *skb2;
> +
> + skb2 = skb_copy_expand(skb, 8, 0, flags);
> dev_kfree_skb_any(skb);
> - return NULL;
> + skb = skb2;
> + if (!skb)
> + return NULL;
> }
>
> skb_push(skb, 4);
At a guess it will be a difference between pskb_expand_head() and
skb_copy_expand(). The latter probably generates a linear skb.
The extra check for skb_cloned() probably also applies - and forces
a data copy.
Have you tried the patch to xhci-ring.c?
David
Powered by blists - more mailing lists