mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
Date: Fri, 21 Jan 2022 10:09:00 -0500	[thread overview]
Message-ID: <YerMjGG8VQkI85bB@rowland.harvard.edu> (raw)
In-Reply-To: <1642764684-26060-1-git-send-email-quic_pkondeti@quicinc.com>

On Fri, Jan 21, 2022 at 05:01:24PM +0530, Pavankumar Kondeti wrote:
> Currently when gadget enumerates in super speed plus, the isoc
> endpoint request buffer size is not calculated correctly. Fix
> this by checking the gadget speed against USB_SPEED_SUPER_PLUS
> and update the request buffer size.
> 
> Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
> ---
>  drivers/usb/gadget/function/f_sourcesink.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
> index 1abf08e..0a423ba 100644
> --- a/drivers/usb/gadget/function/f_sourcesink.c
> +++ b/drivers/usb/gadget/function/f_sourcesink.c
> @@ -584,6 +584,8 @@ static int source_sink_start_ep(struct f_sourcesink *ss, bool is_in,
>  
>  	if (is_iso) {
>  		switch (speed) {
> +		case USB_SPEED_SUPER_PLUS:
> +			fallthrough;

There's no need for this "fallthough" line.  You're allowed to have 
multiple case labels for a single block of code.

Alan Stern

>  		case USB_SPEED_SUPER:
>  			size = ss->isoc_maxpacket *
>  					(ss->isoc_mult + 1) *
> -- 
> 2.7.4
> 

  parent reply	other threads:[~2022-01-21 15:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 11:31 Pavankumar Kondeti
2022-01-21 14:31 ` Greg Kroah-Hartman
2022-01-22  2:56   ` Pavan Kondeti
2022-01-21 15:09 ` Alan Stern [this message]
2022-01-22  2:54   ` Pavan Kondeti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YerMjGG8VQkI85bB@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_pkondeti@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®