diff mbox

[U-Boot] Lower USB_MAX_XFER_BLK to 32767 by default for trimslice

Message ID 1464296140-22085-1-git-send-email-kwizart@gmail.com
State Changes Requested
Delegated to: Marek Vasut
Headers show

Commit Message

Nicolas Chauvet May 26, 2016, 8:55 p.m. UTC
I'm experiencing an issue when loading a generic distro initramfs
on trimslice-pro (with ssd using ehci) with the default value of
65535 for USB_MAX_XFER_BLK
 EHCI timed out on TD - token=0x80008d80

As adviced by Marek on IRC, using a lower value for
USB_MAX_XFER_BLK allows to load the file

Tested values on tegra20-trimslice:
4095 ok
32767 ok
32768 timeout
36864 timeout
40960 timeout
49150 timeout

Tested on current u-boot master

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut May 26, 2016, 9:17 p.m. UTC | #1
On 05/26/2016 10:55 PM, Nicolas Chauvet wrote:
> I'm experiencing an issue when loading a generic distro initramfs
> on trimslice-pro (with ssd using ehci) with the default value of
> 65535 for USB_MAX_XFER_BLK
>  EHCI timed out on TD - token=0x80008d80
> 
> As adviced by Marek on IRC, using a lower value for
> USB_MAX_XFER_BLK allows to load the file
> 
> Tested values on tegra20-trimslice:
> 4095 ok
> 32767 ok
> 32768 timeout
> 36864 timeout
> 40960 timeout
> 49150 timeout
> 
> Tested on current u-boot master

I don't really like adding such patch which affects many devices just to
fix one particular device which is crappy. If you could add some
quirk table into u-boot instead and lower this number only for those
buggy devices, that'd be much better.

> Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
> ---
>  common/usb_storage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index 7e6e52d..c69a7f7 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -106,7 +106,7 @@ struct us_data {
>   * 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
> +#define USB_MAX_XFER_BLK	32767
>  #else
>  #define USB_MAX_XFER_BLK	20
>  #endif
>
diff mbox

Patch

diff --git a/common/usb_storage.c b/common/usb_storage.c
index 7e6e52d..c69a7f7 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -106,7 +106,7 @@  struct us_data {
  * 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
+#define USB_MAX_XFER_BLK	32767
 #else
 #define USB_MAX_XFER_BLK	20
 #endif