Skip to content

Commit

Permalink
usb: mtu3: set interval of FS intr and isoc endpoint
Browse files Browse the repository at this point in the history
Add support to set interval also for FS intr and isoc endpoint.

Fixes: 4d79e04 ("usb: mtu3: add support for usb3.1 IP")
Cc: stable@vger.kernel.org
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20211218095749.6250-4-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Chunfeng Yun authored and Greg Kroah-Hartman committed Dec 21, 2021
1 parent 8c313e3 commit 43f3b8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/usb/mtu3/mtu3_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
interval = clamp_val(interval, 1, 16);
mult = usb_endpoint_maxp_mult(desc) - 1;
}
break;
case USB_SPEED_FULL:
if (usb_endpoint_xfer_isoc(desc))
interval = clamp_val(desc->bInterval, 1, 16);
else if (usb_endpoint_xfer_int(desc))
interval = clamp_val(desc->bInterval, 1, 255);

break;
default:
break; /*others are ignored */
Expand Down

0 comments on commit 43f3b8c

Please sign in to comment.