[argyllcms] Re: HID issue with libusb on Huey

  • From: "Frédéric Crozat" <fred@xxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Sun, 16 Dec 2007 18:15:02 +0100

On Dec 16, 2007 3:16 PM, Graeme Gill <graeme@xxxxxxxxxxxxx> wrote:
> 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 
> busy)

What distribution and what kernel version are you using ?

Was Huey handled by usbhid driver (as shown in /proc/bus/usb/devices) ?

I've also tested when usbhid doesn't handle the device and
USBDEVFS_IOCTL is failing with the same error.

-- 
Frederic Crozat

Other related posts: