Re: [PATCH] usb: quirks: Add quirk to prefer vendor-specific configuration

From: Greg KH
Date: Thu Apr 10 2025 - 03:01:29 EST


On Thu, Apr 10, 2025 at 10:46:26AM +0800, Ivan Hu wrote:
> Some USB devices with multiple configurations expose a vendor-specific
> interface class that should be preferred by default. However, the generic
> usb_choose_configuration() logic selects the first configuration whose
> first interface uses a non-vendor-specific class, which can lead to
> incomplete or limited functionality.
>
> Introduce a new quirk, USB_QUIRK_CHOOSE_VENDOR_SPEC_CFG, which
> instructs the USB core to prefer a configuration that contains a
> vendor-specific interface class when multiple configurations are present.
>
> Apply this quirk to the ASIX AX88179 USB Ethernet adapter
> (0x0b95:0x1790), which requires selecting its vendor-specific
> configuration for full functionality, instead of falling back to
> cdc_ncm.

Shouldn't this be done in userspace instead? And how does other
operating systems handle this, the "first" configuration is usually the
default for them as well, do they have some built-in quirk to handle
this or do they rely on a vendor-provided driver?

thanks,

greg k-h