summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2021-12-18 12:57:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-21 11:05:45 +0300
commit43f3b8cbcf93da7c2755af4a543280c31f4adf16 (patch)
tree394085aeaa380d34eec5d9accf6acc899a3ba730 /drivers/usb
parent8c313e3bfd9adae8d5c4ba1cc696dcbc86fbf9bf (diff)
downloadlinux-43f3b8cbcf93da7c2755af4a543280c31f4adf16.tar.xz
usb: mtu3: set interval of FS intr and isoc endpoint
Add support to set interval also for FS intr and isoc endpoint. Fixes: 4d79e042ed8b ("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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/mtu3/mtu3_gadget.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
index b6c8a4a99c4d..9977600616d7 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
@@ -93,6 +93,13 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
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 */
}