[U-Boot] [PATCH v2] usb: ohci-hcd: submit_common_msg: report actual_length properly

Marek Vasut marex at denx.de
Mon Oct 28 10:03:01 CET 2013


Dear Mateusz Kulikowski,

> submit_common_msg should report amount of data passed from/to device.
> Instead, it always returned size requested by Host.
> 
> Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski at gmail.com>
> ---
>  drivers/usb/host/ohci-hcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index c33c487..8a9e5f4 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -1548,7 +1548,7 @@ int submit_common_msg(struct usb_device *dev,
> unsigned long pipe, void *buffer, }
> 
>  	dev->status = stat;
> -	dev->act_len = transfer_len;
> +	dev->act_len = urb->actual_length;
> 
>  #ifdef DEBUG
>  	pkt_print(urb, dev, pipe, buffer, transfer_len,

Applied, thanks!

Best regards,
Marek Vasut


More information about the U-Boot mailing list