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

Ilya Yanok
2012-08-10T18:34:14Z

Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Beno?t Th?baudeau <
benoit.thebaudeau@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.