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, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to