summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2016-06-06 13:53:43 +0800
committerPeng Fan <peng.fan@nxp.com>2016-06-06 16:41:03 +0800
commitede7538aefc334ce3bbded966211c149659f19a6 (patch)
treed12cd2fa08e02deac2f618cdf3bde2c8216590b5
parent68f095be9f75405768ede36dadbb2d0be91697d9 (diff)
downloadu-boot-imx-imx_v2015.04_4.1.15_1.0.0_ga.zip
u-boot-imx-imx_v2015.04_4.1.15_1.0.0_ga.tar.gz
u-boot-imx-imx_v2015.04_4.1.15_1.0.0_ga.tar.bz2
MLK-12883 usb: limit USB_MAX_XFER_BLK to 256rel_imx_4.1.15_1.2.0_gaimx_v2015.04_4.1.15_1.0.0_ga
For Some USB mass storage devices, such as: " - Kingston DataTraveler 2.0 001D7D06CF09B04199C7B3EA - Class: (from Interface) Mass Storage - PacketSize: 64 Configurations: 1 - Vendor: 0x0930 Product 0x6545 Version 1.16 " When `usb read 0x80000000 0 0x2000`, we met "EHCI timed out on TD - token=0x80008d80". The devices does not support scsi VPD page, we are not able to get the maximum transfer length for READ(10)/WRITE(10). So we limit this to 256 blocks as READ(6). Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)
-rw-r--r--common/usb_storage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 1411737..ad08dea 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -16,6 +16,8 @@
* BBB support based on /sys/dev/usb/umass.c from
* FreeBSD.
*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -138,7 +140,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 256
#else
#define USB_MAX_XFER_BLK 20
#endif