On Wed, Sep 28, 2016 at 04:05:28PM +0300, Felipe Balbi wrote: > We have introduced a helper to calculate multiplier > value from wMaxPacketSize. Start using it. > > Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > Cc: <linux-usb@xxxxxxxxxxxxxxx> > Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> > --- > 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); In the original code, tmp is 0 based, now the new code makes it 1 based. Regards, -Bin. > tmp *= 8 /* applies to entire frame */; > limit += limit * tmp; > } > -- > 2.10.0.440.g21f862b > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html