[argyllcms] Re: HID issue with libusb on Huey

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Mon, 17 Dec 2007 01:16:22 +1100

Frédéric Crozat wrote:

Tested, it doesn't work (and it is not a permission problem, I tested
as root and moreover, we are ensuring
/dev/usb/*/* are always readable and writable by user with console privilege).

I'm getting the same error. Using strace, ioctl used in
detach_kernel_driver_np is not working :
open("/dev/bus/usb/002/004", O_RDWR)    = 3

ioctl(3, USBDEVFS_IOCTL, 0xbf7e7814)    = -1 EINVAL (Invalid argument) <======

ioctl(3, USBDEVFS_SETCONFIGURATION, 0xbf7e7834) = -1 EBUSY (Device or
resource busy)

and kernel is reporting :
usb 2-2: usbfs: interface 0 claimed by usbhid while 'dispcal' sets config #1

Well, I'm not sure I can help much, since this doesn't happen on my system,
and the patch I posted seems to be the thing that worked for
Hal V. Engel, and was the type of thing that worked on another
more recent system I tried the Huey out on (sorry, I don't
have much in the way of details about those systems, apart from
guessing that they are probably v2.6 kernels).

The problem you show above is the detach IOCTL failing. On my system I get:

ioctl(3, USBDEVFS_IOCTL, 0xbfe65c90)    = 0
ioctl(3, USBDEVFS_SETCONFIGURATION, 0xbfe65cb4) = 0
ioctl(3, USBDEVFS_CLAIMINTERFACE, 0xbfe65cb4) = 0
ioctl(3, USBDEVFS_CLEAR_HALT, 0xbfe65cb4) = 0

If I take the usb_detach_kernel_driver_np() out I get:

ioctl(3, USBDEVFS_SETCONFIGURATION, 0xbfecd124) = 0
ioctl(3, USBDEVFS_CLAIMINTERFACE, 0xbfecd124) = -1 EBUSY (Device or resource 

Graeme Gill.

Other related posts: