Loading drivers/usb/dwc3/gadget.c +15 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/slab.h> #include <linux/spinlock.h> Loading @@ -41,6 +43,16 @@ static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc, bool remote_wakeup); static int dwc3_gadget_wakeup_int(struct dwc3 *dwc); /* * Some USB functions' endpoints are not enabled at set config stage. * So fifo_resize cannot happen for these endpoints. * So, user can specify Isochronous IN endpoint using high_bw_ep_in_num * to enable fifo_resize to support high bandwidth transfers. */ static int high_bw_ep_in_num; module_param(high_bw_ep_in_num, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(high_bw_ep_in_num, "Isoc ep number to support for HS high bandwidth transfer"); /** * dwc3_gadget_set_test_mode - Enables USB2 Test Modes * @dwc: pointer to our context structure Loading Loading @@ -216,6 +228,9 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc) dep->endpoint.endless) mult = 3; if (num == high_bw_ep_in_num) mult = 3; if (!(dep->flags & DWC3_EP_ENABLED)) { dev_dbg(dwc->dev, "ep%dIn not enabled", num); goto resize_fifo; Loading drivers/usb/gadget/function/u_uvc.h +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ module_param(streaming_interval, uint, S_IRUGO|S_IWUSR); \ MODULE_PARM_DESC(streaming_interval, "1 - 16"); \ \ static unsigned int streaming_maxpacket = 1024; \ static unsigned int streaming_maxpacket = 3072; \ module_param(streaming_maxpacket, uint, S_IRUGO|S_IWUSR); \ MODULE_PARM_DESC(streaming_maxpacket, "1-1023 (FS), 1-3072 (hs/ss)"); \ \ Loading drivers/usb/gadget/function/uvc_video.c +4 −2 Original line number Diff line number Diff line Loading @@ -240,9 +240,11 @@ uvc_video_alloc_requests(struct uvc_video *video) BUG_ON(video->req_size); req_size = video->ep->maxpacket req_size = (video->ep->maxpacket & 0x7FF) * max_t(unsigned int, video->ep->maxburst, 1) * (video->ep->mult + 1); * (max_t(unsigned int, (video->ep->maxpacket >> 11) & 0x3, video->ep->mult) + 1); for (i = 0; i < UVC_NUM_REQUESTS; ++i) { video->req_buffer[i] = kmalloc(req_size, GFP_KERNEL); Loading Loading
drivers/usb/dwc3/gadget.c +15 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/slab.h> #include <linux/spinlock.h> Loading @@ -41,6 +43,16 @@ static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc, bool remote_wakeup); static int dwc3_gadget_wakeup_int(struct dwc3 *dwc); /* * Some USB functions' endpoints are not enabled at set config stage. * So fifo_resize cannot happen for these endpoints. * So, user can specify Isochronous IN endpoint using high_bw_ep_in_num * to enable fifo_resize to support high bandwidth transfers. */ static int high_bw_ep_in_num; module_param(high_bw_ep_in_num, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(high_bw_ep_in_num, "Isoc ep number to support for HS high bandwidth transfer"); /** * dwc3_gadget_set_test_mode - Enables USB2 Test Modes * @dwc: pointer to our context structure Loading Loading @@ -216,6 +228,9 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc) dep->endpoint.endless) mult = 3; if (num == high_bw_ep_in_num) mult = 3; if (!(dep->flags & DWC3_EP_ENABLED)) { dev_dbg(dwc->dev, "ep%dIn not enabled", num); goto resize_fifo; Loading
drivers/usb/gadget/function/u_uvc.h +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ module_param(streaming_interval, uint, S_IRUGO|S_IWUSR); \ MODULE_PARM_DESC(streaming_interval, "1 - 16"); \ \ static unsigned int streaming_maxpacket = 1024; \ static unsigned int streaming_maxpacket = 3072; \ module_param(streaming_maxpacket, uint, S_IRUGO|S_IWUSR); \ MODULE_PARM_DESC(streaming_maxpacket, "1-1023 (FS), 1-3072 (hs/ss)"); \ \ Loading
drivers/usb/gadget/function/uvc_video.c +4 −2 Original line number Diff line number Diff line Loading @@ -240,9 +240,11 @@ uvc_video_alloc_requests(struct uvc_video *video) BUG_ON(video->req_size); req_size = video->ep->maxpacket req_size = (video->ep->maxpacket & 0x7FF) * max_t(unsigned int, video->ep->maxburst, 1) * (video->ep->mult + 1); * (max_t(unsigned int, (video->ep->maxpacket >> 11) & 0x3, video->ep->mult) + 1); for (i = 0; i < UVC_NUM_REQUESTS; ++i) { video->req_buffer[i] = kmalloc(req_size, GFP_KERNEL); Loading