From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 25 01:53:33 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF7CE16A4CE for ; Tue, 25 Nov 2003 01:53:33 -0800 (PST) Received: from acme.soth.at (door.soth.at [80.110.102.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 429BE4400B for ; Tue, 25 Nov 2003 01:53:32 -0800 (PST) (envelope-from toni@acme.soth.at) Received: from acme.soth.at (localhost [127.0.0.1]) by acme.soth.at (8.12.8/8.12.8) with ESMTP id hAP9rTtE002135; Tue, 25 Nov 2003 10:53:29 +0100 Received: (from toni@localhost) by acme.soth.at (8.12.8/8.12.8/Submit) id hAP9rT5Q002133; Tue, 25 Nov 2003 10:53:29 +0100 Date: Tue, 25 Nov 2003 10:53:29 +0100 From: Toni Andjelkovic To: Dan Langille Message-ID: <20031125095329.GB1975@acme.soth.at> References: <3FC1CEA0.28542.14DD8CEF@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FC1CEA0.28542.14DD8CEF@localhost> User-Agent: Mutt/1.4.1i cc: hackers@freebsd.org Subject: Re: using devel/libusb to access USB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2003 09:53:34 -0000 On Mon, Nov 24 2003 (09:25:52 -0500), Dan Langille wrote: > We have been looking at the devel/libusb port and experimenting with > testlibusb which is a part of that port. We have noticed that > usb_find_devices() does not find any devices. Looking at the usb.c > code within libusb, we found that usb_os_find_devices() does not > return any devices, and therefore the while loop is never entered. > > We tracked the problem down to usb_os_find_devices() (within bsd.c) > and found that various things were preventing the list from being > created. I have experienced a similar problem a few months ago. I've tracked it to ugenopen() in sys/dev/usb/ugen.c, which returned EBUSY if the control endpoint /dev/ugen0 was already open. Consequently, usb_find_devices() failed to return anything useful. However, as Bernd Walter suggested in a recent posting to hackers@, this could be avoided by using interface specific endpoints (/dev/ugen?.?) instead of the control endpoint (/dev/ugen?) for communication. Cheers, Toni