diff mbox

[GIT,PULL] xhci: Regression fix for 3.13.

Message ID 52A166CB.4020508@pobox.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Mark Lord Dec. 6, 2013, 5:55 a.m. UTC
On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
>> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
>>
>>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
>>
>> are available in the git repository at:
>>
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> 
> Pulled and pushed out, thanks.

Did this commit make it into linux-3.12.3 ?

I ask, because the NIC still locks up with that kernel,
and even with the patch I had been using from David Laight.

Reverting the change that originally broke it still works though.
Could we please get this reverted until such time as a reworked
patch can be prepared for it?

This is what I am reverting locally to make it all work
as it did prior to linux-3.12 was released.  Unmangled copy also attached:

Comments

gregkh@linuxfoundation.org Dec. 6, 2013, 3:25 p.m. UTC | #1
On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> >>
> >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
> >>
> >> are available in the git repository at:
> >>
> >>
> >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > 
> > Pulled and pushed out, thanks.
> 
> Did this commit make it into linux-3.12.3 ?

There's this cool tool called 'git' where you can look these things
up... :)

No, it's not there yet, as it's not in Linus's tree yet, give me a
chance...

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Laight Dec. 6, 2013, 3:28 p.m. UTC | #2
> From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> > >>
> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into
> usb-linus (2013-11-27 09:49:03 -0800)
> > >>
> > >> are available in the git repository at:
> > >>
> > >>
> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > >
> > > Pulled and pushed out, thanks.
> >
> > Did this commit make it into linux-3.12.3 ?
> 
> There's this cool tool called 'git' where you can look these things
> up... :)

If you are really desperate to find what is in a specific kernel use
objdump -d.

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sarah Sharp Dec. 6, 2013, 5:03 p.m. UTC | #3
On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> >>
> >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
> >>
> >> are available in the git repository at:
> >>
> >>
> >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > 
> > Pulled and pushed out, thanks.
> 
> Did this commit make it into linux-3.12.3 ?
> 
> I ask, because the NIC still locks up with that kernel,
> and even with the patch I had been using from David Laight.
> 
> Reverting the change that originally broke it still works though.
> Could we please get this reverted until such time as a reworked
> patch can be prepared for it?

Greg, can you please revert David's patch (commit 35773dac5f86 from your
usb-linus branch)?

David said the patch fixed this lock up issue with his USB ethernet
adapter, but Mark says it doesn't fix the issue.  The patch touches some
hairy ring code in the xHCI driver, and I would rather not make any
changes to that code unless we can prove there is an issue with that
code.  We can always add the patch back later if it does turn out to fix
an issue.

David, can you please revert any local changes you've made, revert the
offending commit Mark is talking about (I think it's
http://patchwork.ozlabs.org/patch/264021/, which is commit
f27070158d6754765f2f5fd1617e8e42a0ea2318), and retest?  I want to see if
reverting that commit without making changes to the xHCI ring handling
code fixes your issues.

Thanks,
Sarah Sharp

> 
> This is what I am reverting locally to make it all work
> as it did prior to linux-3.12 was released.  Unmangled copy also attached:
> 
> --- 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);

> --- 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);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Laight Dec. 6, 2013, 5:19 p.m. UTC | #4
> From: Sarah Sharp
> Sent: 06 December 2013 17:03
> To: Mark Lord
> Cc: Greg Kroah-Hartman; linux-usb@vger.kernel.org; David Laight; netdev@vger.kernel.org
> Subject: Re: [GIT PULL] xhci: Regression fix for 3.13.
> 
> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> > >>
> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into
> usb-linus (2013-11-27 09:49:03 -0800)
> > >>
> > >> are available in the git repository at:
> > >>
> > >>
> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > >
> > > Pulled and pushed out, thanks.
> >
> > Did this commit make it into linux-3.12.3 ?
> >
> > I ask, because the NIC still locks up with that kernel,
> > and even with the patch I had been using from David Laight.
> >
> > Reverting the change that originally broke it still works though.
> > Could we please get this reverted until such time as a reworked
> > patch can be prepared for it?
> 
> Greg, can you please revert David's patch (commit 35773dac5f86 from your
> usb-linus branch)?
> 
> David said the patch fixed this lock up issue with his USB ethernet
> adapter, but Mark says it doesn't fix the issue.  The patch touches some
> hairy ring code in the xHCI driver, and I would rather not make any
> changes to that code unless we can prove there is an issue with that
> code.  We can always add the patch back later if it does turn out to fix
> an issue.

I thought Mark had said that my patch fixed things for him with the earlier
kernel.  It certainly makes a massive difference on my system.
And I ran with enough diagnostics to work out when the tx side stopped.
The last packet for which an ack was received was the one before the one
that straddled the ring end.

If you want to change the ax179 driver you need to stop it using
SG and segmentation offload.
The patch that mark is talking about isn't really the one that makes a difference.
I think it just forces the skb be linearised at that point. Which mostly
means that there won't be any fragments.

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 6, 2013, 5:29 p.m. UTC | #5
Sarah, calm down.

Let Greg merge the XHCI fix and let's have people test it.

The whole holdup is because the USB subsystem is taking forever
to merge the XHCI patch.

I would have merged it in 24-48 hours if it were my subsystem. :)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
gregkh@linuxfoundation.org Dec. 6, 2013, 5:29 p.m. UTC | #6
On Fri, Dec 06, 2013 at 09:03:25AM -0800, Sarah Sharp wrote:
> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> > >>
> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
> > >>
> > >> are available in the git repository at:
> > >>
> > >>
> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > > 
> > > Pulled and pushed out, thanks.
> > 
> > Did this commit make it into linux-3.12.3 ?
> > 
> > I ask, because the NIC still locks up with that kernel,
> > and even with the patch I had been using from David Laight.
> > 
> > Reverting the change that originally broke it still works though.
> > Could we please get this reverted until such time as a reworked
> > patch can be prepared for it?
> 
> Greg, can you please revert David's patch (commit 35773dac5f86 from your
> usb-linus branch)?

Now reverted.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 6, 2013, 5:32 p.m. UTC | #7
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Fri, 6 Dec 2013 09:29:47 -0800

> On Fri, Dec 06, 2013 at 09:03:25AM -0800, Sarah Sharp wrote:
>> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
>> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
>> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
>> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
>> > >>
>> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
>> > >>
>> > >> are available in the git repository at:
>> > >>
>> > >>
>> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
>> > > 
>> > > Pulled and pushed out, thanks.
>> > 
>> > Did this commit make it into linux-3.12.3 ?
>> > 
>> > I ask, because the NIC still locks up with that kernel,
>> > and even with the patch I had been using from David Laight.
>> > 
>> > Reverting the change that originally broke it still works though.
>> > Could we please get this reverted until such time as a reworked
>> > patch can be prepared for it?
>> 
>> Greg, can you please revert David's patch (commit 35773dac5f86 from your
>> usb-linus branch)?
> 
> Now reverted.

Please NO!

Merge the XHCI change, the change you have reverted actually fixes
things for some people and the XHCI change gets rid of the stated
regression.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Laight Dec. 6, 2013, 5:46 p.m. UTC | #8
> From: David Miller [mailto:davem@davemloft.net]
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Date: Fri, 6 Dec 2013 09:29:47 -0800
> 
> > On Fri, Dec 06, 2013 at 09:03:25AM -0800, Sarah Sharp wrote:
> >> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> >> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> >> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> >> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> >> > >>
> >> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb
> into usb-linus (2013-11-27 09:49:03 -0800)
> >> > >>
> >> > >> are available in the git repository at:
> >> > >>
> >> > >>
> >> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> >> > >
> >> > > Pulled and pushed out, thanks.
> >> >
> >> > Did this commit make it into linux-3.12.3 ?
> >> >
> >> > I ask, because the NIC still locks up with that kernel,
> >> > and even with the patch I had been using from David Laight.
> >> >
> >> > Reverting the change that originally broke it still works though.
> >> > Could we please get this reverted until such time as a reworked
> >> > patch can be prepared for it?
> >>
> >> Greg, can you please revert David's patch (commit 35773dac5f86 from your
> >> usb-linus branch)?
> >
> > Now reverted.
> 
> Please NO!
> 
> Merge the XHCI change, the change you have reverted actually fixes
> things for some people and the XHCI change gets rid of the stated
> regression.

I know that some of the xhci ring code is rather complex [1].
But that particular patch should be completely safe as it just adds
some extra nop commands into the ring.

Possibly Mark is seeing some additional failure caused by something else.

Without my fix the xhci code carries on sending data to the usb hardware,
but no ethernet frames get transmitted.

[1] I've some thoughts on how to simplify some of the horridness, it also
ought to be possible to transmit from the USB Ge card with a similar
amount of cpu overhead as a reasonable (single queue) ethernet card.
At the moment the USB code has for horrid code paths.
But I'm not looking at that code at the moment because Sarah needs to
catch up with her patch queue.

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sarah Sharp Dec. 6, 2013, 6:19 p.m. UTC | #9
On Fri, Dec 06, 2013 at 05:46:40PM -0000, David Laight wrote:
> > From: David Miller [mailto:davem@davemloft.net]
> > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Date: Fri, 6 Dec 2013 09:29:47 -0800
> > 
> > > On Fri, Dec 06, 2013 at 09:03:25AM -0800, Sarah Sharp wrote:
> > >> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> > >> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > >> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> > >> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> > >> > >>
> > >> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb
> > into usb-linus (2013-11-27 09:49:03 -0800)
> > >> > >>
> > >> > >> are available in the git repository at:
> > >> > >>
> > >> > >>
> > >> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > >> > >
> > >> > > Pulled and pushed out, thanks.
> > >> >
> > >> > Did this commit make it into linux-3.12.3 ?
> > >> >
> > >> > I ask, because the NIC still locks up with that kernel,
> > >> > and even with the patch I had been using from David Laight.
> > >> >
> > >> > Reverting the change that originally broke it still works though.
> > >> > Could we please get this reverted until such time as a reworked
> > >> > patch can be prepared for it?
> > >>
> > >> Greg, can you please revert David's patch (commit 35773dac5f86 from your
> > >> usb-linus branch)?
> > >
> > > Now reverted.
> > 
> > Please NO!
> > 
> > Merge the XHCI change, the change you have reverted actually fixes
> > things for some people and the XHCI change gets rid of the stated
> > regression.
> 
> I thought Mark had said that my patch fixed things for him with the
> earlier kernel.  It certainly makes a massive difference on my system.
> And I ran with enough diagnostics to work out when the tx side
> stopped.  The last packet for which an ack was received was the one
> before the one that straddled the ring end.
>
> If you want to change the ax179 driver you need to stop it using
> SG and segmentation offload.
> The patch that mark is talking about isn't really the one that makes a
> difference.
> I think it just forces the skb be linearised at that point. Which mostly
> means that there won't be any fragments.

Ok, so David verifies the xHCI driver does have an issue, and the patch
does fix the issue as stated.  Fine, let's merge that patch and see if
it helps.  Greg, can you fix this?  Sorry for the churn.

> I know that some of the xhci ring code is rather complex [1].
> But that particular patch should be completely safe as it just adds
> some extra nop commands into the ring.
> 
> Possibly Mark is seeing some additional failure caused by something else.

All right, let's get this patch into linus' tree, and track down exactly
what's causing Mark's issues after it's merged.

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
gregkh@linuxfoundation.org Dec. 6, 2013, 6:26 p.m. UTC | #10
On Fri, Dec 06, 2013 at 10:19:47AM -0800, Sarah Sharp wrote:
> On Fri, Dec 06, 2013 at 05:46:40PM -0000, David Laight wrote:
> > > From: David Miller [mailto:davem@davemloft.net]
> > > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > Date: Fri, 6 Dec 2013 09:29:47 -0800
> > > 
> > > > On Fri, Dec 06, 2013 at 09:03:25AM -0800, Sarah Sharp wrote:
> > > >> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> > > >> > On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> > > >> > > On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> > > >> > >> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> > > >> > >>
> > > >> > >>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb
> > > into usb-linus (2013-11-27 09:49:03 -0800)
> > > >> > >>
> > > >> > >> are available in the git repository at:
> > > >> > >>
> > > >> > >>
> > > >> > >>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> > > >> > >
> > > >> > > Pulled and pushed out, thanks.
> > > >> >
> > > >> > Did this commit make it into linux-3.12.3 ?
> > > >> >
> > > >> > I ask, because the NIC still locks up with that kernel,
> > > >> > and even with the patch I had been using from David Laight.
> > > >> >
> > > >> > Reverting the change that originally broke it still works though.
> > > >> > Could we please get this reverted until such time as a reworked
> > > >> > patch can be prepared for it?
> > > >>
> > > >> Greg, can you please revert David's patch (commit 35773dac5f86 from your
> > > >> usb-linus branch)?
> > > >
> > > > Now reverted.
> > > 
> > > Please NO!
> > > 
> > > Merge the XHCI change, the change you have reverted actually fixes
> > > things for some people and the XHCI change gets rid of the stated
> > > regression.
> > 
> > I thought Mark had said that my patch fixed things for him with the
> > earlier kernel.  It certainly makes a massive difference on my system.
> > And I ran with enough diagnostics to work out when the tx side
> > stopped.  The last packet for which an ack was received was the one
> > before the one that straddled the ring end.
> >
> > If you want to change the ax179 driver you need to stop it using
> > SG and segmentation offload.
> > The patch that mark is talking about isn't really the one that makes a
> > difference.
> > I think it just forces the skb be linearised at that point. Which mostly
> > means that there won't be any fragments.
> 
> Ok, so David verifies the xHCI driver does have an issue, and the patch
> does fix the issue as stated.  Fine, let's merge that patch and see if
> it helps.  Greg, can you fix this?  Sorry for the churn.

Yes, I've pushed it to Linus now, not including the revert.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Lord Dec. 7, 2013, 4:10 a.m. UTC | #11
On 13-12-06 10:25 AM, Greg Kroah-Hartman wrote:
> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
>> On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
>>> On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
>>>> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
>>>>
>>>>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
>>>>
>>>> are available in the git repository at:
>>>>
>>>>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
>>>
>>> Pulled and pushed out, thanks.
>>
>> Did this commit make it into linux-3.12.3 ?
>
> No, it's not there yet, as it's not in Linus's tree yet, give me a chance...

Okay, good to see it moving along.

I asked about 3.12.3, because something new in that release broke
Davids workaround for me here.

But I'm with the rest of you: let's let what's in the pipeline
make it out there (3.12.4 ?) and then I'll retest and repatch that
if necessary to make things work here again.

Thanks
Sarah Sharp Dec. 16, 2013, 9:21 p.m. UTC | #12
On Fri, Dec 06, 2013 at 11:10:29PM -0500, Mark Lord wrote:
> On 13-12-06 10:25 AM, Greg Kroah-Hartman wrote:
> > On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
> >> On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
> >>> On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
> >>>> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
> >>>>
> >>>>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
> >>>>
> >>>> are available in the git repository at:
> >>>>
> >>>>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
> >>>
> >>> Pulled and pushed out, thanks.
> >>
> >> Did this commit make it into linux-3.12.3 ?
> >
> > No, it's not there yet, as it's not in Linus's tree yet, give me a chance...
> 
> Okay, good to see it moving along.
> 
> I asked about 3.12.3, because something new in that release broke
> Davids workaround for me here.
> 
> But I'm with the rest of you: let's let what's in the pipeline
> make it out there (3.12.4 ?) and then I'll retest and repatch that
> if necessary to make things work here again.

Hi Mark,

3.13-rc4 is out now, and it includes David's work-around.  Can you
please test with that kernel and confirm it fixes your issues with the
USB ethernet adapter?

Thanks,
Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Lord Dec. 17, 2013, 3:33 a.m. UTC | #13
On 13-12-16 04:21 PM, Sarah Sharp wrote:
> On Fri, Dec 06, 2013 at 11:10:29PM -0500, Mark Lord wrote:
>> On 13-12-06 10:25 AM, Greg Kroah-Hartman wrote:
>>> On Fri, Dec 06, 2013 at 12:55:23AM -0500, Mark Lord wrote:
>>>> On 13-12-02 04:42 PM, Greg Kroah-Hartman wrote:
>>>>> On Mon, Dec 02, 2013 at 12:49:08PM -0800, Sarah Sharp wrote:
>>>>>> The following changes since commit c24cb6c8b501ebdf1aacec7960110a9741a45ced:
>>>>>>
>>>>>>   Merge tag 'fixes-for-v3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (2013-11-27 09:49:03 -0800)
>>>>>>
>>>>>> are available in the git repository at:
>>>>>>
>>>>>>   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git tags/for-usb-linus-2013-12-02
>>>>>
>>>>> Pulled and pushed out, thanks.
>>>>
>>>> Did this commit make it into linux-3.12.3 ?
>>>
>>> No, it's not there yet, as it's not in Linus's tree yet, give me a chance...
>>
>> Okay, good to see it moving along.
>>
>> I asked about 3.12.3, because something new in that release broke
>> Davids workaround for me here.
>>
>> But I'm with the rest of you: let's let what's in the pipeline
>> make it out there (3.12.4 ?) and then I'll retest and repatch that
>> if necessary to make things work here again.
> 
> Hi Mark,
> 
> 3.13-rc4 is out now, and it includes David's work-around.  Can you
> please test with that kernel and confirm it fixes your issues with the
> USB ethernet adapter?

Just giving it a whirl here tonight.  Looks good, thanks.
I won't have any further opportunity to thrash it until the New Year.

Thanks all!
diff mbox

Patch

--- 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);