[U-Boot] [PATCH] usb_storage: USB storage transfer size increase for xHCI

Sergei Temerkhanov s.temerkhanov at gmail.com
Thu Aug 13 21:13:52 CEST 2015


Tried different values but transfer sizes larger than ~8k blocks never
complete on some controllers causing timeouts and crashes. So, 4k blocks is
a safe enough xfer size

Regards,
Sergey

On Thu, Aug 13, 2015 at 10:09 PM, Marek Vasut <marex at denx.de> wrote:

> On Thursday, August 13, 2015 at 09:00:04 PM, Sergey Temerkhanov wrote:
> > Increase xHCI transfer size for USB storage devices. This helps to
> > achieve 10-20x speedup for large transfers
> >
> > Signed-off-by: Sergey Temerkhanov <s.temerkhanov at gmail.com>
> > Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla at cavium.com>
>
> Hi!
>
> > ---
> >
> >  common/usb_storage.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/common/usb_storage.c b/common/usb_storage.c
> > index b978430..ee5acca 100644
> > --- a/common/usb_storage.c
> > +++ b/common/usb_storage.c
> > @@ -97,13 +97,15 @@ struct us_data {
> >       trans_cmnd      transport;              /* transport routine */
> >  };
> >
> > -#ifdef CONFIG_USB_EHCI
> > +#if defined(CONFIG_USB_EHCI)
> >  /*
> >   * 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 blocks.
> >   */
> >  #define USB_MAX_XFER_BLK     65535
> > +#elif defined(CONFIG_USB_XHCI)
>
> Why don't you keep the XHCI consistent with EHCI, ie 64k transfers as well
> ?
>
> > +#define USB_MAX_XFER_BLK     4096
> >  #else
> >  #define USB_MAX_XFER_BLK     20
> >  #endif
>
> Best regards,
> Marek Vasut
>


More information about the U-Boot mailing list