From owner-freebsd-usb@freebsd.org Fri May 3 08:06:17 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CF871588726 for ; Fri, 3 May 2019 08:06:17 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [150.101.137.139]) by mx1.freebsd.org (Postfix) with ESMTP id A907D8CAB5 for ; Fri, 3 May 2019 08:06:13 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from unknown (HELO midget.dons.net.au) ([118.211.90.89]) by ipmail02.adl2.internode.on.net with ESMTP; 03 May 2019 17:31:01 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x4380hWG028535 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 3 May 2019 17:30:57 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x437Yhat007648 for ; Fri, 3 May 2019 17:04:43 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from maelstrom.gsoft.com.au (Maelstrom.gsoft.com.au [203.31.81.59]) by [118.211.90.89] (envelope-sender ) (MIMEDefang) with ESMTP id x437YaU7007643; Fri, 03 May 2019 17:04:43 +0930 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: USB transfers in device drivers From: "O'Connor, Daniel" In-Reply-To: <93e4ad37-bb57-b186-4743-d6ad86cd40ce@selasky.org> Date: Fri, 3 May 2019 17:04:36 +0930 Cc: freebsd-usb@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <832686F8-4E93-4039-8489-B48CB3B7B809@dons.net.au> References: <3B922C60-32E5-484E-8AFA-28FF7255CF2C@dons.net.au> <64924732-9848-4AF6-B37E-4ED3889DB711@dons.net.au> <0d155a73-31b1-d901-9874-6cb017e6b5d5@selasky.org> <612D5BA0-8580-4CA0-9D8F-67E7D60B2692@dons.net.au> <93e4ad37-bb57-b186-4743-d6ad86cd40ce@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3445.104.8) X-Spam-Score: 0 () No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: A907D8CAB5 X-Spamd-Bar: +++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [7.28 / 15.00]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; MX_GOOD(-0.01)[cached: midget.dons.net.au]; RCPT_COUNT_TWO(0.00)[2]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_IN_DNSWL_LOW(-0.10)[139.137.101.150.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.998,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; DMARC_NA(0.00)[dons.net.au]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; R_SPF_NA(0.00)[]; GREYLIST(0.00)[pass,meta]; IP_SCORE(2.89)[ip: (8.09), ipnet: 150.101.0.0/16(4.31), asn: 4739(2.08), country: AU(-0.01)] X-Spam: Yes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2019 08:06:17 -0000 > On 3 May 2019, at 02:31, Hans Petter Selasky wrote: >=20 > On 2019-05-02 13:38, O'Connor, Daniel wrote: >>> On 2 May 2019, at 20:33, Hans Petter Selasky = wrote: >>>=20 >>> On 2019-05-02 12:44, O'Connor, Daniel wrote: >>>>> On 2 May 2019, at 20:02, Hans Petter Selasky = wrote: >>>>>=20 >>>>> On 2019-05-02 11:18, O'Connor, Daniel wrote: >>>>>> OK, thanks. >>>>>> To be honest I would much prefer to work out why this particular = hardware & software seem to drop the ball for such a long time - 50msec = without the kernel getting to schedule something (on a basically idle = system) is quite perplexing to me. >>>>>=20 >>>>> Sounds like a lost IRQ issue. Did you try any of the EHCI quirks = in hw.usb.ehci ? >>>> No not, yet - thanks for the pointer! >>>=20 >>> The 50ms delay may also be due to a physical link data error and = needed recovery through clear stall which is expensive. >>>=20 >> I see the same error on different hardware sets (both motherboard and = USB device) so I don't think it's that. >=20 > If you can check if a USB BULK transfer is pending during this delay, = then it might also be a firmware issue. OK, I'll try and come up with a program to process usbdump output and = show things like response latency. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum