From owner-freebsd-usb@freebsd.org Sat Sep 29 13:37:18 2018 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 E4488109EC16 for ; Sat, 29 Sep 2018 13:37:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD4F7B1DF for ; Sat, 29 Sep 2018 13:37:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 3E125109EC15; Sat, 29 Sep 2018 13:37:17 +0000 (UTC) Delivered-To: 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 1C1C2109EC13 for ; Sat, 29 Sep 2018 13:37:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1D047B1DC for ; Sat, 29 Sep 2018 13:37:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id EEF6615C88 for ; Sat, 29 Sep 2018 13:37:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w8TDbF0V059632 for ; Sat, 29 Sep 2018 13:37:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w8TDbFvp059631 for usb@FreeBSD.org; Sat, 29 Sep 2018 13:37:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 231782] a USB frame from an interrupt endpoint may be missed Date: Sat, 29 Sep 2018 13:37:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.4-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ludovic.rousseau+freebsd@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 13:37:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231782 --- Comment #2 from Ludovic Rousseau -= -- I do not always reproduce the problem. I do not yet know what is needed to = make the problem to happen. After that it is easy to reproduce but sometimes I g= et a normal execution again with no problem. Strange. For this issue I do not use libusb_cancel_transfer(). No transfer is cancel= led here. I used usbdump to dump the USB traffic. I can reproduce the problem even when usbdump is running. Good. When I have the issue *nothing* is logged by usbdump. The USB frame that sh= ould be received is not dumped. And then libUSB does not see it either. I do not have a USB hardware analyser to confirm the USB frame is really travelling on the USB bus. Since I do not have the issue on GNU/Linux and I have the problem on FreeBSD 10.4 with, at least, 3 different models of USB smart card reader I guess the problem is not in the USB devices. The missing frame is something like: 15:01:49.961874 usbus0.2 DONE-INTR-EP=3D00000083,SPD=3DFULL,NFR=3D1,SLEN=3D4,IVAL=3D16,ERR=3D0 frame[0] READ 2 bytes 0000 50 02 -- -- -- -- -- -- -- -- -- -- -- -- -- -- |P. | flags 0x16 status 0xcb821 It looks like the problem is not in libUSB but in a lower layer. It looks like the problem happens more often when using a USB3 port (blue connector) than a USB2 port. I will join the results of lshal for USB related parts. How can I help debug this issue? --=20 You are receiving this mail because: You are the assignee for the bug.=