How can I check whether USB3.0 UASP (USB Attached SCSI Protocol) mode is enabled in Linux?
Solution 1
If you know the name of your device, find the USB Bus and Device numbers:
$ lsusb
...
Bus 002 Device 005: ID xxxx:yyyy MyDeviceManufacturer
...
Then look at the USB tree and find your device (mine was Bus 2, Dev 5):
$ lsusb -t
...
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
|__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
...
You can see in my case the uas
driver.
If UAS is not in use you would see usb-storage
(like Dev 3 in my case).
Solution 2
In addition to the answer austinmarton gave, you can run
lsusb -v -d VPID | grep -i interface
where VPID is the vendor/product ID reported in lsusb
. For example:
$ lsusb -v -d 1234:5678 | grep -i interface
Couldn't open device, some information will be missing
bDeviceClass 0 (Defined at Interface level)
bNumInterfaces 1
Interface Descriptor:
bInterfaceNumber 0
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 6
Notice that the only bInterfaceProtocol
value listed is 80 Bulk-Only
. This device would not be a UASP-configured device. However, if you see an additional bInterfaceProtocol 98
, this would be a UASP-configured device.
These values are given in decimal, but the spec refers to them by their hex values...
50h (80d): USB Mass Storage Class Bulk-Only (BBB) Transport
62h (98d): Allocated by USB-IF for UAS.
This information can be found in the Mass Storage Specification on usb.org, section 3 Protocol Codes, Table 2 — Mass Storage Transport Protocol.
I'm not sure if this answers your first or second questions, though, since it's unclear if this value would be reported on both machines/devices that do support UASP and those that do not.
Solution 3
To complete the answer:
If your controller does not support UAS, the linux kernel is kind enough to tell you so:
$ dmesg | grep "UAS"
[58669.959610] usb 4-2: USB controller 0000:03:00.0 does not support streams, which are required by the UAS driver.
[58669.959613] usb 4-2: Please try an other USB controller if you wish to use UAS.
Also, lsusb shows a line for bInterfaceProtocol 98, but it is empty:
$ lsusb -v -d 0080:a001 | grep -i interface
bDeviceClass 0 (Defined at Interface level)
bNumInterfaces 1
Interface Descriptor:
bInterfaceNumber 0
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Interface Descriptor:
bInterfaceNumber 0
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 98
iInterface 0
HTH,
R. Daneel olivaw,
The Human Robot Inside.
Related videos on Youtube
Comments
-
ali_m over 1 year
I have a laptop running Ubuntu 15.04 (3.19.0-21-generic) and an external USB3.0 2.5" SATA HDD enclosure which claims that it supports UASP mode (the S2510BPU33 model by StarTech). I have no problems mounting the drive or reading/writing to it.
I'd like to be able to confirm the following:
- That the device itself actually supports UASP
- Whether my chipset also supports UASP
- Whether the device is using UASP when I mount it
Whereabouts can I find this information?
-
austinmarton almost 9 yearsI don't think this answer is correct, the SD and SR drivers don't tell you about UAS. I've got a disk using UAS and it uses the SD driver (lxr.free-electrons.com/source/drivers/scsi/sd.c). Pretty sure the SR driver is for CD/DVD drivers (lxr.free-electrons.com/source/drivers/scsi/sr.c)
-
ali_m almost 9 yearsExcellent - that nicely addresses point 3. If I don't see
Driver=uas
, it would be nice to be able to find out why - for example it could be that either the chipset or the device (or possibly both?) don't support UAS. I'll leave the question open until the end of the week in case someone can answer the other two points, but otherwise I'll accept your answer. -
austinmarton almost 9 yearsI'd like to know the answers to 1 & 2 also, will edit the answer if I figure it out
-
user1686 over 7 yearsThat's because sd/sr work on a different layer than uas/usb-storage.
-
Nathan almost 5 yearsThe Mass Storage Specification document is now found at usb.org/sites/default/files/… .
-
Nathan almost 5 yearsJust to clarify, the presence of the bInterfaceProtocol 98 line indicates that this particular device supports the protocol required for UAS -- but the line is always "empty" (i.e. has no text description string) whether or not UAS is supported. (In fact it's simply empty because no description for class 8/subclass 6/protocol 62 is given in /var/lib/usbutils/usb.ids , to go along with the description "Bulk-Only" given for protocol 50.)
-
user8675309 almost 3 years@Nathan URL updated; thanks!