usb: gadget: Increase max configuration interface to 32
authorAkash Kumar <quic_akakum@quicinc.com>
Thu, 1 Aug 2024 05:30:03 +0000 (11:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Aug 2024 10:50:36 +0000 (12:50 +0200)
Currently, max configuration interfaces are limited to 16, which fails
for compositions containing 10 UVC configurations with interrupt ep
disabled along with other configurations , and we see bind failures
while allocating interface ID in uvc bind.

Increase max configuration interface to 32 to support any large
compositions limited to same size as usb device endpoints as
interfaces cannot be more than endpoints.

Signed-off-by: Akash Kumar <quic_akakum@quicinc.com>
Link: https://lore.kernel.org/r/20240801053003.15153-1-quic_akakum@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/composite.h

index af3cd2aae4bcb3a14ca60a6c9e8ec31af5dcb8f3..6e38fb9d21174a402485e5cc9acf209a5caceb65 100644 (file)
@@ -256,7 +256,7 @@ int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f,
                        struct usb_ep *_ep);
 int usb_func_wakeup(struct usb_function *func);
 
-#define        MAX_CONFIG_INTERFACES           16      /* arbitrary; max 255 */
+#define        MAX_CONFIG_INTERFACES           32
 
 /**
  * struct usb_configuration - represents one gadget configuration