On 10/29/23 16:54, Hector Martin wrote:
On 29/10/2023 21.11, Marek Vasut wrote:
On 10/29/23 08:23, Hector Martin wrote:
This makes things work properly on devices with >= 2 TiB
capacity. If u-boot is built without CONFIG_SYS_64BIT_LBA,
the capacity will be clamped at 2^32 - 1 sectors.

Signed-off-by: Hector Martin <mar...@marcan.st>
---
   common/usb_storage.c | 132 
++++++++++++++++++++++++++++++++++++++++++++-------
   1 file changed, 114 insertions(+), 18 deletions(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index 95507ffbce48..3035f2ee9868 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -66,7 +66,7 @@
   static const unsigned char us_direction[256/8] = {
        0x28, 0x81, 0x14, 0x14, 0x20, 0x01, 0x90, 0x77,
        0x0C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
+       0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x01,

What changed here ?

This is an incomplete bitmap specifying the data transfer direction for
every possible SCSI command ID. I'm adding the new commands I'm now using.

Can you please add a code comment here, so others wouldn't ponder about this too ?

Reply via email to