Skip to contentSkip to conversation

usb: limit USB_MAX_XFER_BLK to 256

RFC PATCH New Marcel Ziswiler 4 participants 7 messages Apr 17, 2019 – Apr 24, 2019

lore
Share & tools
lore
#0 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

From: Peng Fan <[email protected]>

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).

(cherry picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are welcome.

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

 common/usb_storage.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c +5 -1
index 8c889bb1a6..4e284645f5 100644
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
Signature · 1 line
2.20.1
#1 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

Quoted 44 lines · Marcel Ziswiler

From: Peng Fan <[email protected]>

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).

(cherry picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are welcome.

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

 common/usb_storage.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c +0 -0
index 8c889bb1a6..4e284645f5 100644

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct usb_device *udev, · line 956

Quoted 9 lines
common/usb_storage.c +5 -1
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;

Seems like the previous comment, right above this new one, contradicts this claim. Please update the original comment.

That said, there was an attempt to fix this properly by using adaptive block length implementation, which would not impact devices that are not broken. This hack above will degrade performance of such good devices. Maybe you can resuscitate that adaptive approach instead ?

Quoted 4 lines
common/usb_storage.c +0 -0
 #else
 	blk = 20;
 #endif
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

In reply to Marcel Ziswiler

Hi,

I am using an iMX7 with a DataTraveler 3.0 and I’m seeing the same timeout error. However, I have CONFIG_DM_USB=y configured so your patch doesn’t fix my issue. The USB class queries the EHCI driver for its maximum transfer size which is SIZE_MAX. I believe a solution that works with DM is necessary.

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)

       Kingston DataTraveler 3.0 50E54942694AE23017A55884

=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 59184.0 MB = 57.7 GB (121208832 x 512)

Best regards,
Sven

Quoted 61 lines · Marcel Ziswiler

From: Peng Fan <[email protected]>

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).

(cherry picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are welcome.

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

common/usb_storage.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c +5 -1
index 8c889bb1a6..4e284645f5 100644
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
Signature · 1 line
2.20.1
#3 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

Quoted 9 lines

Subject: Re: [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Hi,

I am using an iMX7 with a DataTraveler 3.0 and I’m seeing the same timeout error. However, I have CONFIG_DM_USB=y configured so your patch doesn’t fix my issue. The USB class queries the EHCI driver for its maximum transfer size which is SIZE_MAX. I believe a solution that works with DM is necessary.

Does the patch works for you with non DM usb?

Regards,
Peng

Quoted 79 lines

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)

       Kingston DataTraveler 3.0 50E54942694AE23017A55884

=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 59184.0 MB = 57.7 GB (121208832 x 512)

Best regards,
Sven

Quoted 22 lines · Marcel Ziswiler

From: Peng Fan <[email protected]>

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).

from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

Quoted 7 lines

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are

welcome.

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct

Quoted 16 lines

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

common/usb_storage.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c index renamed from common/usb_storage.c +0 -0

8c889bb1a6..4e284645f5 100644

common/usb_storage.c +0 -0
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct

usb_device *udev,

Quoted 15 lines
common/usb_storage.c +5 -2
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
--

2.20.1

#4 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

Quoted 16 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Peng Fan
Sent: 2019年4月24日 16:57
To: Sven Schwermer <[email protected]>; Marcel Ziswiler <[email protected]>
Cc: Marek Vasut <[email protected]>; Marcel Ziswiler <[email protected]>; u-boot at lists.denx.de
Subject: Re: [U-Boot] [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Quoted 4 lines

Subject: Re: [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Hi,

Quoted 7 lines
Quoted 4 lines

I am using an iMX7 with a DataTraveler 3.0 and I’m seeing the same timeout error. However, I have CONFIG_DM_USB=y configured so your patch doesn’t fix my issue. The USB class queries the EHCI driver for its maximum transfer size which is SIZE_MAX. I believe a solution that works

with DM is necessary.

Does the patch works for you with non DM usb?

Just a quick hack with DM usb, please help verify whether it could fix your issue.

common/usb_storage.c +1 -1
index 8c889bb1a6..0eb63c21f4 100644
@@ -965,7 +965,7 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
        }
 #endif
 
-       us->max_xfer_blk = blk;
+       us->max_xfer_blk = 256;
 }
 
 static int usb_inquiry(struct scsi_cmd *srb, struct us_data *ss)

Regards,
Peng.

Quoted 92 lines

Regards,
Peng

Quoted 64 lines

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)

       Kingston DataTraveler 3.0 50E54942694AE23017A55884

=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 59184.0 MB = 57.7 GB (121208832 x 512)

Best regards,
Sven

Quoted 22 lines · Marcel Ziswiler

From: Peng Fan <[email protected]>

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).

picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

Quoted 7 lines

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are

welcome.

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct

Quoted 16 lines

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

common/usb_storage.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c index renamed from common/usb_storage.c +0 -0

8c889bb1a6..4e284645f5 100644

common/usb_storage.c +0 -0
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct

usb_device *udev,

Quoted 15 lines
Quoted 13 lines
common/usb_storage.c +5 -2
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
--
Quoted 2 lines

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
enx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.com %7C92e70f2854ce4eda6cf908d6c892e747%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636916930623480866&amp;sdata=5DyOZrU55x3Y9 1wuaK%2BmKZsFu4PtUMwd81qNC91MshE%3D&amp;reserved=0

#5 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

Hi Peng,

Yes, this works.

Best regards,
Sven

Quoted 137 lines · Peng Fan
Quoted 17 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Peng Fan
Sent: 2019年4月24日 16:57
To: Sven Schwermer <[email protected]>; Marcel Ziswiler <[email protected]>
Cc: Marek Vasut <[email protected]>; Marcel Ziswiler <[email protected]>; u-boot at lists.denx.de
Subject: Re: [U-Boot] [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Quoted 4 lines

Subject: Re: [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Hi,

Quoted 7 lines
Quoted 4 lines

I am using an iMX7 with a DataTraveler 3.0 and I’m seeing the same timeout error. However, I have CONFIG_DM_USB=y configured so your patch doesn’t fix my issue. The USB class queries the EHCI driver for its maximum transfer size which is SIZE_MAX. I believe a solution that works

with DM is necessary.

Does the patch works for you with non DM usb?

Just a quick hack with DM usb, please help verify whether it could fix your issue.

common/usb_storage.c +1 -1
index 8c889bb1a6..0eb63c21f4 100644
@@ -965,7 +965,7 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
       }
 #endif
 
-       us->max_xfer_blk = blk;
+       us->max_xfer_blk = 256;
 }
 
 static int usb_inquiry(struct scsi_cmd *srb, struct us_data *ss)

Regards,
Peng.

Quoted 92 lines

Regards,
Peng

Quoted 64 lines

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)

      Kingston DataTraveler 3.0 50E54942694AE23017A55884

=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 59184.0 MB = 57.7 GB (121208832 x 512)

Best regards,
Sven

Quoted 22 lines · Marcel Ziswiler

From: Peng Fan <[email protected]>

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).

picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

Quoted 7 lines

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are

welcome.

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct

Quoted 16 lines

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

common/usb_storage.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c index renamed from common/usb_storage.c +0 -0

8c889bb1a6..4e284645f5 100644

common/usb_storage.c +0 -0
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct

usb_device *udev,

Quoted 15 lines
Quoted 13 lines
common/usb_storage.c +5 -2
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
--
Quoted 2 lines

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
enx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.com %7C92e70f2854ce4eda6cf908d6c892e747%7C686ea1d3bc2b4c6fa92cd99c5 c301635%7C0%7C0%7C636916930623480866&amp;sdata=5DyOZrU55x3Y9 1wuaK%2BmKZsFu4PtUMwd81qNC91MshE%3D&amp;reserved=0

#6 lore raw

RFC PATCH v3 1/1 usb: limit USB_MAX_XFER_BLK to 256

Quoted 7 lines

Subject: Re: [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Hi Peng,

Yes, this works.

Thanks for verification, so it is same issue.

Thanks,
Peng.

Quoted 151 lines

Best regards,
Sven

Quoted 25 lines · Peng Fan
Quoted 24 lines

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Peng Fan
Sent: 2019年4月24日 16:57
To: Sven Schwermer <[email protected]>; Marcel Ziswiler <[email protected]>
Cc: Marek Vasut <[email protected]>; Marcel Ziswiler <[email protected]>; u-boot at lists.denx.de
Subject: Re: [U-Boot] [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Quoted 9 lines

Subject: Re: [RFC PATCH v3] usb: limit USB_MAX_XFER_BLK to 256

Hi,

I am using an iMX7 with a DataTraveler 3.0 and I’m seeing the same timeout error. However, I have CONFIG_DM_USB=y configured so your patch doesn’t fix my issue. The USB class queries the EHCI driver for its maximum transfer size which is SIZE_MAX. I believe a solution that works

Quoted 5 lines
Quoted 3 lines

with DM is necessary.

Does the patch works for you with non DM usb?

Just a quick hack with DM usb, please help verify whether it could fix your

issue.

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct

Quoted 6 lines
common/usb_storage.c index renamed from common/usb_storage.c +0 -0

8c889bb1a6..0eb63c21f4 100644

common/usb_storage.c +0 -0
@@ -965,7 +965,7 @@ static void usb_stor_set_max_xfer_blk(struct

usb_device *udev,

Quoted 34 lines
common/usb_storage.c +1 -1
       }
 #endif
 
-       us->max_xfer_blk = blk;
+       us->max_xfer_blk = 256;
 }
 
 static int usb_inquiry(struct scsi_cmd *srb, struct us_data *ss)

Regards,
Peng.

Quoted 22 lines

Regards,
Peng

Quoted 18 lines

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)

      Kingston DataTraveler 3.0 50E54942694AE23017A55884

=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 59184.0 MB = 57.7 GB (121208832 x 512)

Best regards,
Sven

Quoted 1 line

On 18 Apr 2019, at 01:45, Marcel Ziswiler <[email protected]>

Quoted 60 lines · wrote:
Quoted 60 lines
Quoted 60 lines
Quoted 21 lines

From: Peng Fan <[email protected]>

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).

picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

Quoted 8 lines

---
This comes from NXP's downstream and has proven to tremendously improve the situation with those odd USB mass storage aka memory sticks. This is why I post it here asking whether or not this may be something benefiting more people. Any feedback and suggestions are

welcome.

common/usb_storage.c static void usb_stor_set_max_xfer_blk(struct

Quoted 16 lines

Changes in v3:
- Drop the reference to the NXP internal MLK-xxx tracking number as suggested by Peng.

Changes in v2:
- Fixed spelling in comment as suggested by Igor.

common/usb_storage.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
common/usb_storage.c index renamed from common/usb_storage.c +0 -0

8c889bb1a6..4e284645f5 100644

common/usb_storage.c +0 -0
@@ -949,7 +949,11 @@ static void usb_stor_set_max_xfer_blk(struct

usb_device *udev,

Quoted 13 lines
common/usb_storage.c +5 -2
 	 * there is enough free heap space left, but the SCSI READ(10) and
 	 * WRITE(10) commands are limited to 65535 blocks.
 	 */
-	blk = USHRT_MAX;
+	/*
+	 * Some USB mass storage devices have issues, limiting this to 256
+	 * fixes this.
+	 */
+	blk = 256;
 #else
 	blk = 20;
 #endif
--
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flis
ts.d

enx.de%2Flistinfo%2Fu-boot&amp;data=02%7C01%7CPeng.Fan%40nxp.com

Quoted 1 line
Quoted 1 line

%7C92e70f2854ce4eda6cf908d6c892e747%7C686ea1d3bc2b4c6fa92cd9

9c5

Quoted 1 line
Quoted 1 line

c301635%7C0%7C0%7C636916930623480866&amp;sdata=5DyOZrU55x3Y9

Quoted 1 line
Quoted 1 line

1wuaK%2BmKZsFu4PtUMwd81qNC91MshE%3D&amp;reserved=0