From owner-freebsd-current@FreeBSD.ORG Fri Nov 14 22:14:36 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE2791065670 for ; Fri, 14 Nov 2008 22:14:36 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out1.fuse.net (mail-out1.fuse.net [216.68.8.175]) by mx1.freebsd.org (Postfix) with ESMTP id 87ACD8FC12 for ; Fri, 14 Nov 2008 22:14:36 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=w5m9-Qw7vYMbzEzd8_oA:9 a=W1pSYJJ6w2yGMuZ5ok_5x_lWeOsA:4 a=LY0hPdMaydYA:10 a=JdwsIZe5TaBzFlummj0A:9 a=PwOfHJgRampFFV2Q_iFhIkXkKhoA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50725] helo=mail.cokane.org) by mail-out1.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 64/26-06843-148FD194 for ; Fri, 14 Nov 2008 17:14:36 -0500 Received: by mail.cokane.org (Postfix, from userid 103) id 812471DB2F9; Fri, 14 Nov 2008 17:14:25 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DNS_FROM_SECURITYSAGE autolearn=no version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cokane.org (Postfix) with ESMTP id 3F6F81DB2F9; Fri, 14 Nov 2008 17:14:19 -0500 (EST) From: Coleman Kane To: Hans Petter Selasky In-Reply-To: <200811142017.49692.hselasky@c2i.net> References: <83e5fb980811051638n5f9a1a5dr60160ed7e2ed7a1c@mail.gmail.com> <1226687528.19638.4.camel@localhost> <200811142017.49692.hselasky@c2i.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-E7s8EmlVMPVWWjFLdHhL" Organization: FreeBSD Project Date: Fri, 14 Nov 2008 17:10:58 -0500 Message-Id: <1226700658.19638.16.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: Diego Depaoli , freebsd-current@freebsd.org Subject: Re: Usb2 and hal issue X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 22:14:36 -0000 --=-E7s8EmlVMPVWWjFLdHhL Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2008-11-14 at 20:17 +0100, Hans Petter Selasky wrote: > Hi Kane! >=20 > Your patch will solve the CPU problem, but will otherwise not fix FreeBSD= USB=20 > support under HAL. >=20 > 1) Hal should use "devd" to get attach/detach events. > 2) Hal should use libusb20/libusb to access USB functions and to enumerat= e USB=20 > devices. >=20 > --HPS Thanks, Yes, after further investigation I found out that it just fixes the CPU utilization issue, but the USB support remains broken. I don't use its USB support all that much, so I didn't even realize this until recently. I guess our old USB code presented /dev/usb0, /dev/usb1, ..., /dev/usbN for N+1 USB controllers. These aren't here anymore so maybe the above suggestion to use libusb now for FreeBSD (which currently gets disabled when configure realizes we're FreeBSD) is the best approach. I managed to get the libusb20 library working with libfprint and the associated pam_fprint and fprint_demo software. It is working really well for me so far. >=20 > On Friday 14 November 2008, Coleman Kane wrote: > > On Thu, 2008-11-06 at 01:38 +0100, Diego Depaoli wrote: > > > Hi all, > > > I don't know how provide further details, but on my system there is > > > something of wrong between new usb2 drivers and hald. > > > Top shows hald's cpu load at 100% while with old drivers it's 2-4%. > > > I tried rebuilding hald, loading/unloading each usb2_* device but > > > nothing changed, so I suspect the problem is located in usb2_core. > > > > I figured out the problem, and I have a solution. As the other person > > mentioned, the device name has changed from "/dev/usb" into "/dev/usb > > " (the space is important). However, the hald daemon doesn't use libusb > > on FreeBSD. Here's a patch which tells hald to look at the new device, > > apply it to the root of your ports collection. > > > > Additionally, I think it is a bug that hald busy-loops trying (and > > failing) to open "/dev/usb". Ideally, I think that hald should put a > > sleep in there of some sort, to give up CPU to something else. >=20 --=20 Coleman Kane --=-E7s8EmlVMPVWWjFLdHhL Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkkd920ACgkQcMSxQcXat5dN6gCffBd2bdvR+sC6cewAGzn2IeL9 HSQAn2KQM1G3VEgoYrXhg/Qjd2YGID9c =yMMl -----END PGP SIGNATURE----- --=-E7s8EmlVMPVWWjFLdHhL--