Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TUSB9261: Consultation about Max xfer length (blocks) in SCSI

Part Number: TUSB9261

Tool/software:

I'm sorry to bother you.

Here is the problem: 

I must use store-and-forward so I disable the wrap window. And then the TUSB9261 Demo has a 64kB (limited by hardware) buffer used to cache reads/writes which means it can only cache up to 128 blocks(512Byte) of memory.

But the SCSI Write-10 and Read-10 command has a total-blocks field that can be up to 240 blocks (120KB) for USB2.0. When originally testing the product on Windows 11 it never writes more than 128 blocks at a time. However, when tested on Linux it sometimes writes more than 128 blocks, which causes the usb storage device to crash. The Linux source code says that for USB2.0, the default max_sectors=240 blocks


Is there a way to tell the Linux host OS not to request more than 128 blocks?

I know that the TUSB9261 firmware has implemented block limit VPD page, and it works well on Windows 10/11. I even set the block limit to be 64 blocks, it's OK too. Because before the data transfer, the windows host issue an SCSI inquiry order with the VPD PAGE CODE is 0xB0, so the device could transmit the block limits information to the host. And then the windows host could adjust the amount of data transferred.

However, on Linux or MacOS, the host does not appear to be running the block limits command. So maybe the host don't know what is the block limits. So the write/read blocks number beyond the buffer size.

It really bothers me a lot. What can I do?

  • Hi Chongyu,

    I don't have much if any experience with Linux, but it sounds like this issue more so stems from the hosts not issuing an inquiry to the 9261, and sticking with its intended higher setting. The only means I can think of to prevent this would be to make a change at the host or driver used to connect to the TUSB9261 and see what changes can be made from there.

    Outside of that, I don't believe we have any other means to get around this, as the TUSB9261 cannot support higher.

    Thanks,

    Ryan