[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y8/68L3Se8094kru@kroah.com>
Date: Tue, 24 Jan 2023 16:36:16 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Prashanth K <quic_prashk@...cinc.com>
Cc: Pavel Hofman <pavel.hofman@...tera.com>,
Joe Perches <joe@...ches.com>, Julian Scheel <julian@...st.de>,
Colin Ian King <colin.i.king@...il.com>,
Pratham Pratap <quic_ppratap@...cinc.com>,
Jack Pham <quic_jackp@...cinc.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [v2] usb: gadget: f_uac2: Fix incorrect increment of
bNumEndpoints
On Tue, Jan 24, 2023 at 04:59:47PM +0530, Prashanth K wrote:
> Currently connect/disconnect of USB cable calls afunc_bind and
> eventually increments the bNumEndpoints. Performing multiple
> plugin/plugout will increment bNumEndpoints incorrectly, and on
> the next plug-in it leads to invalid configuration of descriptor
> and hence enumeration fails.
>
> Fix this by resetting the value of bNumEndpoints to 1 on every
> afunc_bind call.
>
> Fixes: 40c73b30546e ("usb: gadget: f_uac2: add adaptive sync support for capture")
> Signed-off-by: Pratham Pratap <quic_ppratap@...cinc.com>
> Signed-off-by: Prashanth K <quic_prashk@...cinc.com>
> ---
> drivers/usb/gadget/function/f_uac2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
> index 08726e4..0219cd7 100644
> --- a/drivers/usb/gadget/function/f_uac2.c
> +++ b/drivers/usb/gadget/function/f_uac2.c
> @@ -1142,6 +1142,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
> }
> std_as_out_if0_desc.bInterfaceNumber = ret;
> std_as_out_if1_desc.bInterfaceNumber = ret;
> + std_as_out_if1_desc.bNumEndpoints = 1;
> uac2->as_out_intf = ret;
> uac2->as_out_alt = 0;
>
> --
> 2.7.4
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Powered by blists - more mailing lists