diff mbox series

[v2] usb: gadget: Increase max configuration interface to 32

Message ID 20240521054257.32689-1-quic_akakum@quicinc.com
State New
Headers show
Series [v2] usb: gadget: Increase max configuration interface to 32 | expand

Commit Message

AKASH KUMAR May 21, 2024, 5:42 a.m. UTC
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 the same size as USB device endpoints, as
interfaces cannot be more than endpoints.

Signed-off-by: Akash Kumar <quic_akakum@quicinc.com>
---
 include/linux/usb/composite.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

AKASH KUMAR July 12, 2024, 12:04 p.m. UTC | #1
Gentle Reminder!!!

On 5/21/2024 11:12 AM, Akash Kumar wrote:
> 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 the same size as USB device endpoints, as
> interfaces cannot be more than endpoints.
>
> Signed-off-by: Akash Kumar <quic_akakum@quicinc.com>
> ---
>   include/linux/usb/composite.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
> index 2040696d75b6..d6d4fbfb6d0e 100644
> --- a/include/linux/usb/composite.h
> +++ b/include/linux/usb/composite.h
> @@ -255,7 +255,7 @@ int config_ep_by_speed_and_alt(struct usb_gadget *g, struct usb_function *f,
>   int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f,
>   			struct usb_ep *_ep);
>   
> -#define	MAX_CONFIG_INTERFACES		16	/* arbitrary; max 255 */
> +#define	MAX_CONFIG_INTERFACES		32
>   
>   /**
>    * struct usb_configuration - represents one gadget configuration
diff mbox series

Patch

diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 2040696d75b6..d6d4fbfb6d0e 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -255,7 +255,7 @@  int config_ep_by_speed_and_alt(struct usb_gadget *g, struct usb_function *f,
 int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f,
 			struct usb_ep *_ep);
 
-#define	MAX_CONFIG_INTERFACES		16	/* arbitrary; max 255 */
+#define	MAX_CONFIG_INTERFACES		32
 
 /**
  * struct usb_configuration - represents one gadget configuration