From mboxrd@z Thu Jan 1 00:00:00 1970 From: martin f krafft Date: Tue, 13 Jan 2004 17:44:29 +0000 Subject: usb: failure to obtain HID descriptor via usb_control_msg Message-Id: <20040113174429.GA8118@piper.madduck.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" List-Id: To: linux-hotplug@vger.kernel.org --opJtzjQTFsWo+cga Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D 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. --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! =20 "there are more things in heaven and earth, horatio, than are dreamt of in your philosophy." -- hamlet --opJtzjQTFsWo+cga Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFABC59IgvIgzMMSnURAqfJAJ94ZcZqhW3Ia+Wd5BZioYhTj9AjDwCgyO5e C1nYNsIKe3vtku4ObmO8vdM= =hXxz -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- ------------------------------------------------------- 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