From owner-freebsd-usb@freebsd.org Mon Feb 5 15:36:09 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 D5D1BED21C4 for ; Mon, 5 Feb 2018 15:36:08 +0000 (UTC) (envelope-from romain@blogreen.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 71EC178732 for ; Mon, 5 Feb 2018 15:36:08 +0000 (UTC) (envelope-from romain@blogreen.org) Received: by mailman.ysv.freebsd.org (Postfix) id 33615ED21C3; Mon, 5 Feb 2018 15:36:08 +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 1F6F2ED21C2 for ; Mon, 5 Feb 2018 15:36:08 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from marvin.blogreen.org (blogreen.org [151.127.25.53]) by mx1.freebsd.org (Postfix) with ESMTP id 997F178731 for ; Mon, 5 Feb 2018 15:36:07 +0000 (UTC) (envelope-from romain@blogreen.org) Received: by marvin.blogreen.org (Postfix, from userid 1001) id C07B396096; Mon, 5 Feb 2018 16:35:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blogreen.org; s=marvin; t=1517844959; bh=LS9+CP/Yy+AzX2h6smH4Fl54SQKp9QYuTu3uWvt/eX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=IGdUlEVM4e1dYuuJQWuH2ZQzZONNXuH2nhoITWCyiO9JhEDoXRZgaJ1XtFa0gfUHy Z/tbqa/QMTVZj15Qp0wRKzNByTmSdmup6ASDFPPLsGV4foN9RgJ/M3xeT57mbx9QAy ZSFVGa8PCavoRmqUycHz/ygIm4oIVaMx0cdpMyP0= Date: Mon, 5 Feb 2018 16:35:59 +0100 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: Hans Petter Selasky Cc: usb@freebsd.org Subject: Re: Feedback for portable libusb code Message-ID: <20180205153559.GA19249@blogreen.org> References: <20180129184445.GB7783@blogreen.org> <9128056d-c916-597e-f866-48cf6051ee0e@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline In-Reply-To: <9128056d-c916-597e-f866-48cf6051ee0e@selasky.org> X-PGP-Key: http://romain.blogreen.org/pubkey.asc User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 15:36:09 -0000 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Mon, Jan 29, 2018 at 08:10:06PM +0100, Hans Petter Selasky wrote: > Does the attached patch for FreeBSD's libusb solve your issue? I have just patched, build and installed libusb. I removed the libusb_open() / libusb_close() calls from usb_get_port_path() in libsigrok and tested. https://github.com/sigrokproject/libsigrok/blob/a9010323ddf4e479663e871386c= 05db05ea3522e/src/usb.c#L473-L491 Unfortunately, the problem is still present. On the first enumeration, libusb_get_port_numbers() returns 3 and the firmware is send to the device successfully. Then, when lbsigrok attempt to re-enumerate devices, libusb_get_port_numbers() returns -12 (LIBUSB_ERROR_NOT_SUPPORTED). I am sure that the firmware is sent successfully because usbconfig(8) shows the following when I plug the device: | ugen0.10: at usbus0, cfg=3D0 md=3DHOST spd= =3DHIGH (480Mbps) pwr=3DON (100mA) and after the enumeration failure, I can see this instead: | ugen0.10: at usbus0, cfg=3D0 md=3DHOST spd=3DHIGH (480Mb= ps) pwr=3DON (100mA) Regards, Romain --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEgjSaeOfAuAcLWYD/uk0dlVESM28FAlp4ed0ACgkQuk0dlVES M28CXAv/SZXf0ptR0RaORq8VDtnWaKWNd+AZ9FMinW0O61t1a2WpLhmC1OKK8iyZ 6xMevEmdFSYpq34kIwxwMm9XMcFj7bp82zHRmbxyDb/XHTHw6ZJhfAfkS5xhxCjX s2oKRfUENSxKG9c7UCpsibn1BxeX0dfH3bDguA551InihPTpGR3+rhzTwd5KDhsf CZvmpVwgtQhtJs0UaVgDAwANHiitP66J7cKpKAGYzuJqTH4cYlBqsg3EV4YOi324 bHyP85AQ86W4e18qypHAGxoizIafZLM6g1Rzi8hSeSIy4/QGNekAV+cm6v48aNdS PNTffC8/jCNGK5db9zrvymrLtLZMi3udEpNn9cyGmpTV1EfbPNSEYXoN5Lu/EZYO FbijZ9n2oOZoVz4fwFLXYXcS55x8CGVTUe5indeQOTeVnlQ32ajgsoZsPQLEEep6 v2akTtdunWqvvkb5DlD8TMC/S1sJ9X3PXriWoc9VseyIjG21wbcA5pYSH24lotSV /kgj/myK =ZxpZ -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1--