[U-Boot] [PATCH] Lower USB_MAX_XFER_BLK to 32767 for trimslice

Nicolas Chauvet kwizart at gmail.com
Sat May 28 10:06:38 CEST 2016


I'm experiencing an issue when loading a generic distro initramfs
on trimslice-pro (with ssd using usb-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

v2:
- Allow to override if undefined when using CONFIG_USB_EHCI
- Only change the value for trimslice
- Update description

Signed-off-by: Nicolas Chauvet <kwizart at gmail.com>
---
 common/usb_storage.c        | 2 ++
 include/configs/trimslice.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index 7e6e52d..aea0477 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -106,7 +106,9 @@ struct us_data {
  * enough free heap space left, but the SCSI READ(10) and WRITE(10) commands are
  * limited to 65535 blocks.
  */
+#ifndef USB_MAX_XFER_BLK	 /* Allows a quirk for broken devices */
 #define USB_MAX_XFER_BLK	65535
+#endif
 #else
 #define USB_MAX_XFER_BLK	20
 #endif
diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h
index b761640..3a2fe87 100644
--- a/include/configs/trimslice.h
+++ b/include/configs/trimslice.h
@@ -43,6 +43,8 @@
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
 #define CONFIG_USB_STORAGE
+/* Quirk for broken usb-ehci on trimslice */
+#define USB_MAX_XFER_BLK 32767
 
 /* USB networking support */
 #define CONFIG_USB_HOST_ETHER
-- 
2.4.11



More information about the U-Boot mailing list