From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>Thinh Nguyen
<Thinh.Nguyen@synopsys.com>,
linux-usb@vger.kernel.org,
Vamsi Krishna Samavedam <vskrishn@codeaurora.org>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
Takashi Iwai <tiwai@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: John Youn <John.Youn@synopsys.com>
Subject: [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor
Date: Tue, 13 Mar 2018 10:30:45 +0200 [thread overview]
Message-ID: <87efko8jii.fsf@linux.intel.com> (raw)
Hi,
Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> The maximum bytes per interval for USB SuperSpeed Plus can be set by
> isoc endpoint companion descriptor when it is above 48K. If the
> descriptor is provided, then use its value.
>
> USB 3.1 spec 9.6.8
>
> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
you should have Cc:ed Greg for this one. FWIW:
"This descriptor shall be returned for each Isochronous endpoint that
requires more than 48K bytes per Service Interval."
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> ---
> drivers/usb/core/urb.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
> index 9fdf137c4865..0ab4b896e3f3 100644
> --- a/drivers/usb/core/urb.c
> +++ b/drivers/usb/core/urb.c
> @@ -433,6 +433,14 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
> max *= mult;
> }
>
> + if (dev->speed == USB_SPEED_SUPER_PLUS &&
> + USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
> + struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
> +
> + isoc_ep_comp = &ep->ssp_isoc_ep_comp;
> + max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
> + }
> +
> /* "high bandwidth" mode, 1-3 packets/uframe? */
> if (dev->speed == USB_SPEED_HIGH)
> max *= usb_endpoint_maxp_mult(&ep->desc);
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-03-13 8:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 8:30 Felipe Balbi [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-14 1:02 [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor Thinh Nguyen
2018-01-31 21:15 Thinh Nguyen
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=87efko8jii.fsf@linux.intel.com \
--to=felipe.balbi@linux.intel.com \
--cc=John.Youn@synopsys.com \
--cc=Thinh.Nguyen@synopsys.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;
as well as URLs for NNTP newsgroup(s).