Jetson as USB mass-storage device with UASP

I have a Jetson NX Orin with Jetpack 6.2 running Linux kernel 5.15. It can connect to a Windows workstation, so it behaves as a USB upstream device. It establishes 5 Gbps over a USB 3.x port. I have configured one partition to be exposed via USB (BOT mode) to an externally connected host, and this is working fine. It can achieve data transfer speeds of about 300 MB/s. Is it possible to reconfigure it so it appears as a USB UASP (USB Attached SCSI Protocol) device? If not, is it a hardware limitation or a Linux kernel support limitation? My goal is to improve the mass-storage device read speed.

Thank you!

*** Please note that this reply is generated by LLM automatically ***

To address your question, let’s break down the information and analyze the possibilities.

Current Configuration:
Your Jetson Orin NX is currently configured to use USB BOT (Bulk-Only Transport) mode, which allows it to expose a partition to an externally connected host. This configuration is working fine, and you’re achieving data transfer speeds of about 300 MB/s.

Goal:
Your goal is to improve the mass storage device read speed by reconfiguring the Jetson Orin NX to appear as a USB UASP (USB Attached SCSI Protocol) device.

USB UASP vs. USB BOT:
USB UASP is a more advanced protocol that provides better performance and efficiency compared to USB BOT. UASP supports multiple commands, allowing for more efficient data transfer and improved performance.

Hardware Limitation:
The Jetson Orin NX hardware supports USB 3.x, which is capable of achieving speeds of up to 5 Gbps. Since you’re already achieving 5 Gbps speeds in your current configuration, it’s unlikely that the hardware is the limiting factor.

Linux Kernel Support:
The Linux kernel 5.15, which is running on your Jetson Orin NX, does support USB UASP. However, the kernel configuration and module loading might need to be adjusted to enable UASP support.

Reconfiguration Possibility:
To reconfigure your Jetson Orin NX to appear as a USB UASP device, you’ll need to:

  1. Verify that the Linux kernel 5.15 has the necessary UASP support modules loaded. You can check this by running the command lsmod | grep uas.
  2. If the UASP support modules are not loaded, you’ll need to configure the kernel to load them. This might involve modifying the kernel configuration files or adding the necessary modules to the kernel command line.
  3. Once the UASP support modules are loaded, you’ll need to configure the USB device to use UASP instead of BOT. This might involve modifying the USB device configuration files or using a tool like usb_modeswitch to switch the device to UASP mode.

Comparison with Other Options:
If reconfiguring the Jetson Orin NX to use UASP is not possible or does not provide the desired performance improvement, you might consider other options, such as:

  • Using a different USB controller or hub that supports UASP.
  • Implementing a custom USB driver or firmware that optimizes data transfer speeds.
  • Exploring other storage protocols, such as NVMe or SATA, which might provide better performance than USB.

In conclusion, while it’s possible to reconfigure the Jetson Orin NX to appear as a USB UASP device, it will likely require kernel configuration and module loading adjustments. If successful, this reconfiguration might improve the mass storage device read speed. However, if the reconfiguration is not possible or does not provide the desired performance improvement, you might need to explore other options.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

I have already tried asking my question to various AI assistants online, but they give confusing answers. For example, your answer mentions uas driver, which is required when a USB device acts as a host (downstream) rather than a USB device (upstream). Following this can lead to incorrect conclusions and instructions.

I would prefer a reply from someone with experience with a USB upstream device in UASP mode.

Hi,
Please refer to the topic thread:
USB drive cannot operate at UASP

And the user shares a patch:
USB drive cannot operate at UASP - #17 by tonyyang2033

You can refer to developer guide to enable kernel configs and rebuild kernel:
Kernel Customization — NVIDIA Jetson Linux Developer Guide

Thank you for your quick reply, but the given topic link addresses the use case when Jetson is a host with a mass storage device attached (e.g., an external USB SSD disk). It doesn’t address the USB gadget use case that I need (Jetson acts as a mass-storage device attached to a Windows workstation and is seen as a disk drive in Windows).

Hi,
We don’t have experience about the use-case and are not able to suggest further. Would see if other users can provide suggestion.