From owner-freebsd-current@FreeBSD.ORG Sat Mar 21 23:53:13 2009 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 9066A1065674 for ; Sat, 21 Mar 2009 23:53:13 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-fx0-f167.google.com (mail-fx0-f167.google.com [209.85.220.167]) by mx1.freebsd.org (Postfix) with ESMTP id EDCF88FC25 for ; Sat, 21 Mar 2009 23:53:12 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: by fxm11 with SMTP id 11so1252167fxm.43 for ; Sat, 21 Mar 2009 16:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:message-id:user-agent:mime-version:content-type; bh=mvXM+MMFwZ3HiQQfXi/w3wZvWbv6Qz/k6wAxyvbsGBI=; b=TZxejIHQ0e7vLHnCUiN8dX8UxZc/mwMuJFg+u8YXE42O+eOG5ilF9WJ6uCM0v+a2ZQ aNuU+NyG5Yg746e5qwX1wDgB2hbLgH3x6kqFKtqWNx4IBkHzAj3Jm1hK0Y6r2MlsZemr mOQxywqhn9GmwNoCPCE0rGW/L4l0djkwz5FAI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; b=BXj9LGQckhIQHpqFf7Pq1A87/ASM2/FtVpwGqV31/+ogqc0bhEQ9qDfkWVItvycacD h/TyWNHc2x5jWOQ5/oBcnBreW/Wpm10IWUHiQfCCTVap+WDHthH5x3MIxxA9LJzaCb8Q PUSCvxVU3cHwbzZnmadLjlBnnVwrTFtuOo/e8= Received: by 10.86.49.13 with SMTP id w13mr2501827fgw.1.1237679591909; Sat, 21 Mar 2009 16:53:11 -0700 (PDT) Received: from localhost (95-24-174-59.broadband.corbina.ru [95.24.174.59]) by mx.google.com with ESMTPS id e11sm5122763fga.20.2009.03.21.16.53.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Mar 2009 16:53:10 -0700 (PDT) From: Anonymous To: Pieter de Goeje References: <200903211448.28590.pieter@degoeje.nl> <200903211706.58474.hselasky@c2i.net> <200903212222.23952.pieter@degoeje.nl> Date: Sun, 22 Mar 2009 02:52:33 +0300 Message-ID: <861vsqe8n2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@freebsd.org, Hans Petter Selasky Subject: Re: usbconfig / hal-device no longer lists usb devices 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: Sat, 21 Mar 2009 23:53:14 -0000 Pieter de Goeje writes: > On Saturday 21 March 2009, Hans Petter Selasky wrote: >> On Saturday 21 March 2009, Pieter de Goeje wrote: >> > Since a couple of weeks usbconfig and hal-device no longer list my usb >> > devices. I know it worked before (also with the new USB stack). I think >> > this causes my mouse to not work in X, while it works fine on the >> > console. I've double checked that I don't have libusb from ports >> > installed. I've rebuild kernel/world, make delete-old && make delete-old >> > libs, recompiled hald, but still no success. >> > >> > $ uname -a >> > FreeBSD nox.student.utwente.nl 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat >> > Mar 21 13:37:32 CET 2009 >> > pyotr@nox.student.utwente.nl:/usr/obj/FreeBSD/FreeBSD-current/src/sys/GEN >> >ER IC i386 >> > [...] >> >> Make sure that the devices under /dev/usb/xxx have proper permissions. >> >> --HPS > > Yes, they all have the same permissions: crw-------. I'm running usbconfig as > root btw, so it shouldn't matter. > > I added a bunch of printf()s to libusb, specifically ugen20_enumerate(). > Both ugen0.2 and ugen1.2 failed at ioctl(f, USB_GET_PLUGTIME, &plugtime) > because it returned EINVAL. The ugenX.2 files were opened successfully. > > At this point it looks like the problem lies somewhere in the kernel, which > makes it a lot harder for me to debug. Can you try to back out r189906? Doing so makes my keyboard to appear in usbconfig output again. Here is a ktrace diff for `usbconfig -u 0 -a 3'. @@ -480,43 +480,23 @@ 1830 usbconfig NAMI "/dev/ugen0.3" 1830 usbconfig RET open 4 1830 usbconfig CALL ioctl(0x4,USB_GET_PLUGTIME,0x7fffffffe5bc) - 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL ioctl(0x4,USB_GET_DEVICE_DESC,0x7fffffffe730) - 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL ioctl(0x4,USB_GET_DEVICEINFO,0x7fffffffe5c0) - 1830 usbconfig RET ioctl 0 + 1830 usbconfig RET ioctl -1 errno 22 Invalid argument 1830 usbconfig CALL close(0x4) 1830 usbconfig RET close 0 1830 usbconfig CALL ioctl(0x3,USB_READ_DIR,0x7fffffffe430) 1830 usbconfig RET ioctl 0 1830 usbconfig CALL close(0x3) 1830 usbconfig RET close 0 - 1830 usbconfig CALL open(0x7fffffffe614,O_RDWR,0) - 1830 usbconfig NAMI "/dev/ugen0.3" - 1830 usbconfig RET open 3 - 1830 usbconfig CALL open(0x7fffffffe614,O_RDWR,0) - 1830 usbconfig NAMI "/dev/ugen0.3" - 1830 usbconfig RET open 4 - 1830 usbconfig CALL ioctl(0x4,USB_GET_PLUGTIME,0x7fffffffe654) - 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL ioctl(0x3,USB_GET_CONFIG,0x7fffffffe5c4) - 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL ioctl(0x3,USB_GET_POWER_MODE,0x7fffffffe5d4) - 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL fstat(0x1,0x7fffffffe000) + 1830 usbconfig CALL fstat(0x1,0x7fffffffe550) 1830 usbconfig STRU struct stat {dev=100728576, ino=147, mode=crw--w---- , nlink=1, uid="holo", gid="tty", rdev=147, atime="Mar 22 01:57:44 2009", stime="Mar 22 01:57:44 2009", ctime="Mar 22 01:57:44 2009", birthtime="Jan 1 02:59:59 1970", size=0, blksize=4096, blocks=0, flags=0x0 } 1830 usbconfig RET fstat 0 - 1830 usbconfig CALL ioctl(0x1,TIOCGETA,0x7fffffffe050) + 1830 usbconfig CALL ioctl(0x1,TIOCGETA,0x7fffffffe5a0) 1830 usbconfig RET ioctl 0 - 1830 usbconfig CALL write(0x1,0x800a07000,0x56) - 1830 usbconfig GIO fd 1 wrote 86 bytes - "ugen0.3: at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON + 1830 usbconfig CALL write(0x1,0x800a07000,0x28) + 1830 usbconfig GIO fd 1 wrote 40 bytes + "No device match or lack of permissions. " - 1830 usbconfig RET write 86/0x56 - 1830 usbconfig CALL close(0x4) - 1830 usbconfig RET close 0 - 1830 usbconfig CALL close(0x3) - 1830 usbconfig RET close 0 + 1830 usbconfig RET write 40/0x28 1830 usbconfig CALL sigprocmask(SIG_BLOCK,0x80063cc68,0x7fffffffe7c8) 1830 usbconfig RET sigprocmask 0 1830 usbconfig CALL sigprocmask(SIG_SETMASK,0x80063cc80,0)