[PATCH 03/12] Revert "usb: gadget: fastboot: use correct max packet size"

Peng Fan (OSS) peng.fan at oss.nxp.com
Tue Jun 29 04:27:27 CEST 2021


Maxime

On 2021/6/25 21:05, Maxime Ripard wrote:
> This reverts commit 27c9141b1114fd5721437abbb1c694e45e765f19.
> ---
>   drivers/usb/gadget/f_fastboot.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
> index 8ba55aab9f8f..1fcffaf9dd26 100644
> --- a/drivers/usb/gadget/f_fastboot.c
> +++ b/drivers/usb/gadget/f_fastboot.c
> @@ -427,7 +427,7 @@ static unsigned int rx_bytes_expected(struct usb_ep *ep)
>   {
>   	int rx_remain = fastboot_data_remaining();
>   	unsigned int rem;
> -	unsigned int maxpacket = usb_endpoint_maxp(ep->desc);
> +	unsigned int maxpacket = ep->maxpacket;

Have you ever checked what's the value here of ep->maxpacket and 
usb_endpoint_maxp(ep->desc); in your failure case?

Regards,
Peng.

>   
>   	if (rx_remain <= 0)
>   		return 0;
> 


More information about the U-Boot mailing list