Re: [RFC/PATCH 22/45] usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 28, 2016 at 04:05:31PM +0300, Felipe Balbi wrote:
> We have introduced a helper to calculate multiplier
> value from wMaxPacketSize. Start using it.
> 
> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/gadget/udc/gr_udc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
> index 39b7136d31d9..3786b5dbfd01 100644
> --- a/drivers/usb/gadget/udc/gr_udc.c
> +++ b/drivers/usb/gadget/udc/gr_udc.c
> @@ -1539,7 +1539,7 @@ static int gr_ep_enable(struct usb_ep *_ep,
>  	 * additional transactions.
>  	 */
>  	max = 0x7ff & usb_endpoint_maxp(desc);
> -	nt = 0x3 & (usb_endpoint_maxp(desc) >> 11);
> +	nt = usb_endpoint_maxp_mult(desc);

In the original code, nt is 0 based, now the new code makes it 1 based.

Regards,
-Bin.

>  	buffer_size = GR_BUFFER_SIZE(epctrl);
>  	if (nt && (mode == 0 || mode == 2)) {
>  		dev_err(dev->dev,
> -- 
> 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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux