* usb: failure to obtain HID descriptor via usb_control_msg
@ 2004-01-13 17:44 martin f krafft
2004-01-13 19:09 ` Greg KH
2004-01-13 22:12 ` Oliver Neukum
0 siblings, 2 replies; 3+ messages in thread
From: martin f krafft @ 2004-01-13 17:44 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]
Hi there,
First off, please apologise the cross-post. I will make sure to send
the solution to both lists. Please, if you identify the problem to
be with either project, take the other list out of the reply
recipients.
I am trying to get the HID descriptor of a HID device with
usb_control_msg:
udev = usb_open(dev);
usb_set_altinterface(udev, 0);
usb_claim_interface(udev, 0);
usb_control_msg(udev, USB_ENDPOINT_IN+1, USB_REQ_GET_DESCRIPTOR,
USB_DT_HID, 0, buf, 0x9, USB_TIMEOUT);
However, this fails with the following debug messages (level 3),
even though it was invoked by root:
Check that you have permissions to write to 002/004 and, if you
don't, that you set up hotplug
(http://linux-hotplug.sourceforge.net/) correctly.
USB error: could not claim interface 0: Device or resource busy
USB error: error sending control message: Device or resource busy
So I dived into hotplug and ended up adding a line to
/etc/hotplug/usb.usermap to effectively disable the device by
specifying a name unequal to all kernel module names, as advised on
the hotplug webpage:
nonexistant 0x0 0x06c2 0x0038 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
My reasoning is that I assume the device to be busy because the HID
kernel driver has assumed control over it (and it's in fact
accessible via /dev/usb/hiddev?). However, it may also be a libusb
problem that I am overseeing
However the result was not very pleasing:
usb.agent[7712]: Setup hid for USB product 6c2/38/300
usb.agent[7712]: kernel driver hid already loaded
usb.agent[7712]: Setup nonexistant for USB product 6c2/38/300
effectively, my addition caused the 'nonexistant' pseudo-driver to
be set up in addition to hid.
How can I disable hotplug setting up 'hid' for this very device?
Thanks for any pointers or tips.
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
"there are more things in heaven and earth, horatio,
than are dreamt of in your philosophy."
-- hamlet
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: usb: failure to obtain HID descriptor via usb_control_msg
2004-01-13 17:44 usb: failure to obtain HID descriptor via usb_control_msg martin f krafft
@ 2004-01-13 19:09 ` Greg KH
2004-01-13 22:12 ` Oliver Neukum
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-01-13 19:09 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jan 13, 2004 at 06:44:29PM +0100, martin f krafft wrote:
>
> How can I disable hotplug setting up 'hid' for this very device?
Disable CONFIG_USB_HID from your kernel configuration :)
There is a usbfs ioctl that can disconnect a driver from a device, but I
don't know if that ever got backported to 2.4 (it's in 2.6). You could
also use that.
Good luck,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: usb: failure to obtain HID descriptor via usb_control_msg
2004-01-13 17:44 usb: failure to obtain HID descriptor via usb_control_msg martin f krafft
2004-01-13 19:09 ` Greg KH
@ 2004-01-13 22:12 ` Oliver Neukum
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2004-01-13 22:12 UTC (permalink / raw)
To: linux-hotplug
Am Dienstag, 13. Januar 2004 20:09 schrieb Greg KH:
> On Tue, Jan 13, 2004 at 06:44:29PM +0100, martin f krafft wrote:
> >
> > How can I disable hotplug setting up 'hid' for this very device?
>
> Disable CONFIG_USB_HID from your kernel configuration :)
>
> There is a usbfs ioctl that can disconnect a driver from a device, but I
> don't know if that ever got backported to 2.4 (it's in 2.6). You could
> also use that.
It is in 2.4.
In theory you are racing with module load of the HID driver, so prepare
to retry.
Regards
Oliver
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-13 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13 17:44 usb: failure to obtain HID descriptor via usb_control_msg martin f krafft
2004-01-13 19:09 ` Greg KH
2004-01-13 22:12 ` Oliver Neukum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.