From owner-freebsd-current@FreeBSD.ORG Fri Nov 14 19:07:20 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 F16641065674 for ; Fri, 14 Nov 2008 19:07:20 +0000 (UTC) (envelope-from cokane@cokane.org) Received: from mail-out1.fuse.net (mail-out1.fuse.net [216.68.8.175]) by mx1.freebsd.org (Postfix) with ESMTP id BB26B8FC14 for ; Fri, 14 Nov 2008 19:07:20 +0000 (UTC) (envelope-from cokane@cokane.org) X-CNFS-Analysis: v=1.0 c=1 a=Edpxj_50DTAA:10 a=OLi8wmkSIQgA:10 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=U5Kc31l3n5fGGVCZ-bUA:9 a=STG5tLz8Tz8uX6XEuE5V2YWzJ0cA:4 a=LY0hPdMaydYA:10 a=1lVj6UbEQlY9jcdvkecA:9 a=XR8GSrIWIRZaaohZ0xPUiR4dajMA:4 a=NfA2RSpTaHsA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50803] helo=mail.cokane.org) by mail-out1.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 0C/9C-06843-1E8CD194 for ; Fri, 14 Nov 2008 13:52:19 -0500 Received: by mail.cokane.org (Postfix, from userid 103) id 02F941DB2FA; Fri, 14 Nov 2008 13:52:16 -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,AWL,BAYES_00, DNS_FROM_SECURITYSAGE autolearn=no version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) by mail.cokane.org (Postfix) with ESMTP id D4A851DB2F9; Fri, 14 Nov 2008 13:52:10 -0500 (EST) From: Coleman Kane To: Diego Depaoli In-Reply-To: <1226687528.19638.4.camel@localhost> References: <83e5fb980811051638n5f9a1a5dr60160ed7e2ed7a1c@mail.gmail.com> <1226687528.19638.4.camel@localhost> Content-Type: multipart/mixed; boundary="=-+eR1UP90aWrexYGv5p2z" Date: Fri, 14 Nov 2008 13:48:49 -0500 Message-Id: <1226688529.19638.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Mailman-Approved-At: Fri, 14 Nov 2008 21:01:09 +0000 Cc: freebsd-current Subject: Re: Usb2 and hal issue (fix to previous) 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:07:21 -0000 --=-+eR1UP90aWrexYGv5p2z Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2008-11-14 at 13:32 -0500, 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. > Ooops. I made a mistake in that last patch. Use this attached one instead -- Coleman Kane --=-+eR1UP90aWrexYGv5p2z Content-Disposition: attachment; filename=hal-port-usb2.patch Content-Type: text/x-patch; name=hal-port-usb2.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-usb.c-usb2 b/sysutils/hal/files/patch-hald_freebsd_hf-usb.c-usb2 new file mode 100644 index 0000000..8c73d40 --- sysutils/hal/files/patch-hald_freebsd_hf-usb.c-usb2 +++ sysutils/hal/files/patch-hald_freebsd_hf-usb.c-usb2 @@ -0,0 +1,11 @@ +--- hald/freebsd/hf-usb.c.orig 2008-11-14 12:37:19.000000000 -0500 ++++ hald/freebsd/hf-usb.c 2008-11-14 12:37:28.000000000 -0500 +@@ -40,7 +40,7 @@ + #include "hf-devtree.h" + #include "hf-util.h" + +-#define HF_USB_DEVICE "/dev/usb" ++#define HF_USB_DEVICE "/dev/usb " + + typedef struct + { --=-+eR1UP90aWrexYGv5p2z--