Hi,

>Hi Krzysztof, and thank you for the help!
>
>> Oh now I see. I missed this when I was reading this email for the first
>> time.
>>
>> root@spark ~ # echo -n 2-10.3 > /sys/bus/usb/drivers/usb/unbind
>>
>>
>> You are trying to unbind here wrong driver I think. Try to unbound driver
>> for interface instead of for whole device:
>>
>> # echo -n 2-10.3:1.0 > /sys/bus/usb/drivers/usb/unbind
>
> I've tried to unbind 2-10.3:[0-4].[0-4] but bash always tells me that
> there's no such device.
>
> The strace output is very long, and I can't make much sense of it, but
> I uploaded it as a GitHub gist:
> https://gist.github.com/mondalaci/424d145263b5b6160d02bd42ce80247f

This output is quite similar to what I expected. This part is important:

ioctl(10, USBDEVFS_CLAIMINTERFACE, 0x7fff881fc78c) = -1 ENOENT (No such
file or directory)
write(1, "         Report Descriptors: \n", 30) = 30
write(1, " ** UNAVAILABLE **\n", 29) = 29

So lsusb is trying to claim your hid interface but it gets the ENOENT
error and that's nothing weird because before executing lsusb you
kicked-off the generic USB device driver:

echo -n 2-10.3 > /sys/bus/usb/drivers/usb/unbind

which is responsible for setting USB device configuration and when you
unbind it from your device it just simply puts whole device in
unconfigured state. This means that you cannot claim any interface
because they simply don't exist in your system device hierarchy.

So to make things simply working I suggest to:
1) Disconnect your device (or alternatively just rebind the driver;))

2) Go to /sys/bus/usb/devices

3) Find directory which corresponds to your device (for example 2-10.3)

4) As you have 3 interfaces you will then have 3 directories which names
starts with name of your device but then there is additional : and two
digits. (for example 2-10.3:1.0). The last digit is bInterfaceNumber.

5) Use lsusb -t to check to which interfaces your driver is bound.

6) Unbind first driver using:
# echo -n 2-10.3:1.X > /sys/bus/usb/drivers/usb/unbind

Where X is bInterfaceNumber of one of interfaces in your device to which
some driver is bound.

7) Execute lsusb -t once again to check if there are some drivers left.
If yes goto 6.

8) Execute your lsusb command to get your report descriptors.

Cheers,
Krzysztof Opasiak
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to