On 11/18/2016 06:10 PM, gre...@linuxfoundation.org wrote:
This is a note to let you know that I've just added the patch titled usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult() to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-next branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will also be merged in the next major kernel release during the merge window. If you have any questions about this process, please let me know. From ee8ac85596ec0b45c7dd49e2a2a0af50f98542cd Mon Sep 17 00:00:00 2001 From: Felipe Balbi <felipe.ba...@linux.intel.com> Date: Wed, 28 Sep 2016 13:30:59 +0300 Subject: usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult() We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Alan Stern <st...@rowland.harvard.edu> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com> --- drivers/usb/gadget/udc/dummy_hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 77d07904f932..14004cf88d4d 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -1483,8 +1483,7 @@ static int periodic_bytes(struct dummy *dum, struct dummy_ep *ep) int tmp; /* high bandwidth mode */ - tmp = usb_endpoint_maxp(ep->desc); - tmp = (tmp >> 11) & 0x03; + tmp = usb_endpoint_maxp_mult(ep->desc);
Again, don't you need to subtract 1?
tmp *= 8 /* applies to entire frame */; limit += limit * tmp; }
MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html