From owner-freebsd-current@FreeBSD.ORG Fri Nov 14 19:15:42 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 01E751065678 for ; Fri, 14 Nov 2008 19:15:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0DD8FC17 for ; Fri, 14 Nov 2008 19:15:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=aniA1o7mVp4QawOfT9qHqA==:17 a=IIlZ5es7KegrrPeZsz0A:9 a=KPGPsS0wJcmt886-lH_OCo5fTQgA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.1] (account mc467741@c2i.net [62.113.133.1] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 977440074; Fri, 14 Nov 2008 20:15:39 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Fri, 14 Nov 2008 20:17:48 +0100 User-Agent: KMail/1.9.7 References: <83e5fb980811051638n5f9a1a5dr60160ed7e2ed7a1c@mail.gmail.com> <1226687528.19638.4.camel@localhost> In-Reply-To: <1226687528.19638.4.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811142017.49692.hselasky@c2i.net> Cc: Diego Depaoli , Coleman Kane 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 19:15:42 -0000 Hi Kane! Your patch will solve the CPU problem, but will otherwise not fix FreeBSD USB support under HAL. 1) Hal should use "devd" to get attach/detach events. 2) Hal should use libusb20/libusb to access USB functions and to enumerate USB devices. --HPS 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.