Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 08:43:25 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: ucom modem issue on recent RELENG_8
Message-ID:  <4DB6BDED.7060800@sentex.net>
In-Reply-To: <201104261204.26266.hselasky@c2i.net>
References:  <4DB622D3.2000000@sentex.net> <201104260856.34362.hselasky@c2i.net> <201104261204.26266.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/26/2011 6:04 AM, Hans Petter Selasky wrote:
> On Tuesday 26 April 2011 08:56:34 Hans Petter Selasky wrote:
>> On Tuesday 26 April 2011 03:41:39 Mike Tancsa wrote:
>>> Hi,
>>>
>>> 	I have run into a problem where ucom no longer works with a recent
>>> 	kernel
>>>
>>> from this past week on RELENG_8. I tried the same setup with RELENG_8
>>> from Feb 14th and it works as expected.  I am about to start narrowing
>>> it down but was wondering if any one had any hints as to what to try ? 
>>> The symptoms are that large packets fail.
>>
>> There has been some EHCI patches in 8-stable recently. Else there hasn't
>> been many changes at all with regard to USB.
> 
> Reviewing one of my patches, I think I might have introduced a small bug 
> related to sending of ZLP's. Can you apply this patch and report back?

Hi,
	That seems to help a lot!  I will run some more tests to make sure it
fully works, but my test case with large ping packets no longer fails.
Thanks for the very quick fix!

Here is the patch I tested with which is one line off from yours for
some reason ?

% diff -u ehci.c /tmp/ehci.c
--- ehci.c      2011-04-20 16:04:24.000000000 -0400
+++ /tmp/ehci.c 2011-04-26 08:42:50.000000000 -0400
@@ -1197,6 +1197,8 @@
                dt ^= 1;        /* short packet at the end */
        else if (actlen != xlen)
                dt ^= 1;        /* zero length packet at the end */
+       else if (xlen == 0)
+               dt ^= 1;        /* zero length transfer */

        xfer->endpoint->toggle_next ^= dt;
 }


	---Mike

> 
> 
> === ehci.c
> ==================================================================
> --- ehci.c      (revision 220904)
> +++ ehci.c      (local)
> @@ -1196,6 +1196,8 @@
>                 dt ^= 1;        /* short packet at the end */
>         else if (actlen != xlen)
>                 dt ^= 1;        /* zero length packet at the end */
> +       else if (xlen == 0)
> +               dt ^= 1;        /* zero length transfer */
>  
>         xfer->endpoint->toggle_next ^= dt;
> 
> 
> --HPS
> 
> 


-- 
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mike@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DB6BDED.7060800>