This is a note to let you know that I've just added the patch titled usb: gadget: tegra-xudc: fix the wrong mult value for HS isoc or intr to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-gadget-tegra-xudc-fix-the-wrong-mult-value-for-hs-isoc-or-intr.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From eeb0cfb6b2b6b731902e68af641e30bd31be3c7b Mon Sep 17 00:00:00 2001 From: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx> Date: Fri, 13 Aug 2021 14:30:51 +0800 Subject: usb: gadget: tegra-xudc: fix the wrong mult value for HS isoc or intr From: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx> commit eeb0cfb6b2b6b731902e68af641e30bd31be3c7b upstream. usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize of endpoint descriptor, not includes bit[12:11] anymore, so use usb_endpoint_maxp_mult() instead. Meanwhile no need AND 0x7ff when get maxp, remove it. Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller") Cc: stable@xxxxxxxxxxxxxxx Acked-by: Felipe Balbi <balbi@xxxxxxxxxx> Signed-off-by: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/1628836253-7432-5-git-send-email-chunfeng.yun@xxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/gadget/udc/tegra-xudc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -1610,7 +1610,7 @@ static void tegra_xudc_ep_context_setup( u16 maxpacket, maxburst = 0, esit = 0; u32 val; - maxpacket = usb_endpoint_maxp(desc) & 0x7ff; + maxpacket = usb_endpoint_maxp(desc); if (xudc->gadget.speed == USB_SPEED_SUPER) { if (!usb_endpoint_xfer_control(desc)) maxburst = comp_desc->bMaxBurst; @@ -1621,7 +1621,7 @@ static void tegra_xudc_ep_context_setup( (usb_endpoint_xfer_int(desc) || usb_endpoint_xfer_isoc(desc))) { if (xudc->gadget.speed == USB_SPEED_HIGH) { - maxburst = (usb_endpoint_maxp(desc) >> 11) & 0x3; + maxburst = usb_endpoint_maxp_mult(desc) - 1; if (maxburst == 0x3) { dev_warn(xudc->dev, "invalid endpoint maxburst\n"); Patches currently in stable-queue which might be from chunfeng.yun@xxxxxxxxxxxx are queue-5.10/usb-mtu3-fix-the-wrong-hs-mult-value.patch queue-5.10/usb-gadget-tegra-xudc-fix-the-wrong-mult-value-for-hs-isoc-or-intr.patch queue-5.10/usb-mtu3-use-mult-for-hs-isoc-or-intr.patch queue-5.10/usb-mtu3-restore-hs-function-when-set-ss-ssp.patch