[U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

Ilya Yanok ilya.yanok at cogentembedded.com
Fri Aug 10 20:34:14 CEST 2012


Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
benoit.thebaudeau at advansee.com> wrote:

> diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
> u-boot-usb-4f8254e/common/usb_storage.c
> index 0cd6399..822bd64 100644
> --- u-boot-usb-4f8254e.orig/common/usb_storage.c
> +++ u-boot-usb-4f8254e/common/usb_storage.c
> @@ -157,12 +157,13 @@ struct us_data {
>
>  #ifdef CONFIG_USB_EHCI
>  /*
> - * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
> - * of 4096 bytes in a transfer without running itself out of qt_buffers
> + * The U-Boot EHCI driver can handle any transfer length as long as there
> is
> + * enough free heap space left, but the SCSI READ(10) and WRITE(10)
> commands are
> + * limited to 65535 bytes.
>

bytes?


>   */
> -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) /
> blksz)
> +#define USB_MAX_XFER_BLK       65535
>

But here you limit it to 65535 _blocks_, right? One of the two should be
wrong ;)

Regards, Ilya.


More information about the U-Boot mailing list