Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Dec 2020 22:30:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        usb@FreeBSD.org
Subject:   [Bug 251784] USB_DO_REQUEST ERR#5 'Input/output error' for 0x0b05:0x18f3 ASUS AURA LED Controller
Message-ID:  <bug-251784-19105-vEpW3ZKxEL@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251784-19105@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251784-19105@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251784

--- Comment #7 from Greg V <greg@unrelenting.technology> ---
So, turns out libusb does its own descriptor parsing, I can fix this in lib=
usb:

--- i/lib/libusb/libusb20_desc.c
+++ w/lib/libusb/libusb20_desc.c
@@ -208,10 +208,9 @@ libusb20_parse_config_desc(const void *config_desc)
                        }
                        /*
                         * Sometimes USB devices have corrupt interface
-                        * descriptors and we need to overwrite the provided
-                        * interface number!
+                        * descriptors. Do not overwrite the provided
+                        * interface number though!
                         */
-                       last_if->desc.bInterfaceNumber =3D niface - 1;
                        last_if->extra.ptr =3D LIBUSB20_ADD_BYTES(ptr, ptr[=
0]);
                        last_if->extra.len =3D 0;
                        last_if->extra.type =3D LIBUSB20_ME_IS_RAW;

=E2=80=A6aaand huh. This changes the number in usbconfig dump_all_desc too.
TIL usbconfig uses libusb :)

Now, this shouldn't fix it for uhid/hidraw usage (and I'd like to eventually
get hidapi-hidraw working maybe) I guess?

But I can't find 'bInterfaceNumber =3D' in kernel code at all. Who assigns =
that?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251784-19105-vEpW3ZKxEL>