usbconfig / hal-device no longer lists usb devices
Anonymous
swell.k at gmail.com
Sat Mar 21 16:53:14 PDT 2009
Pieter de Goeje <pieter at degoeje.nl> 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 at 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,<unused>0)
- 1830 usbconfig NAMI "/dev/ugen0.3"
- 1830 usbconfig RET open 3
- 1830 usbconfig CALL open(0x7fffffffe614,O_RDWR,<unused>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: <product 0x00dd Microsoft> 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)
More information about the freebsd-current
mailing list