From owner-freebsd-usb@freebsd.org Sat Dec 12 22:30:21 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B52D4C3110 for ; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ctj5n3kMqz4WNw for ; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 7FED84C2F2E; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FB6F4C301B for ; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ctj5n1rHXz4WCr for ; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 322F124AC5 for ; Sat, 12 Dec 2020 22:30:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BCMULAV077034 for ; Sat, 12 Dec 2020 22:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0BCMUL6d077033 for usb@FreeBSD.org; Sat, 12 Dec 2020 22:30:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Sat, 12 Dec 2020 22:30:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: greg@unrelenting.technology X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Dec 2020 22:30:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251784 --- Comment #7 from Greg V --- 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.=