From owner-freebsd-usb@FreeBSD.ORG Tue Apr 26 12:43:54 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324A3106566C for ; Tue, 26 Apr 2011 12:43:54 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id E647B8FC12 for ; Tue, 26 Apr 2011 12:43:53 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p3QChjiT077108 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 26 Apr 2011 08:43:45 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4DB6BDED.7060800@sentex.net> Date: Tue, 26 Apr 2011 08:43:25 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Hans Petter Selasky References: <4DB622D3.2000000@sentex.net> <201104260856.34362.hselasky@c2i.net> <201104261204.26266.hselasky@c2i.net> In-Reply-To: <201104261204.26266.hselasky@c2i.net> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-usb@freebsd.org Subject: Re: ucom modem issue on recent RELENG_8 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 12:43:54 -0000 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/