Opened 5 years ago

Closed 5 years ago

Last modified 23 months ago

#1315 closed enhancement (fixed)

Add support for Realtek RTL9210 USB to NVMe bridge

Reported by: BradGeeeeeeeeeeeeeeeeeee Owned by: Christian Franke
Priority: minor Milestone: Release 7.2
Component: all Version: 7.1
Keywords: nvme usb Cc:

Description

Hello! I have a RTL9210 based NVME to USB adapter and would like to request for this chip to be supported by Smartmontools. I googled around but did not find any prior discussion about this particular adapter type.

Here is output from my adapter with an NVME drive installed:

# sudo smartctl -x -d scsi /dev/disk/by-id/usb-Samsung_SSD_960_EVO_250G_012345678905-0\:0
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-3-amd64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Samsung
Product:              SSD 960 EVO 250G
Revision:             CXE7
Compliance:           SPC-4
User Capacity:        250,059,350,016 bytes [250 GB]
Logical block size:   512 bytes
Physical block size:  8388608 bytes
Lowest aligned LBA:   10016
LU is fully provisioned [LBPRZ=1]
Rotation Rate:        Solid State Device
Logical Unit id:      0x3001237923792379
Serial number:        0000000000000000
Device type:          disk
Local Time is:        Sun Apr  5 21:01:15 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported
Read Cache is:        Enabled
Writeback Cache is:   Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging

The USB ID is 0bda:9210. Let me know if you want full lsusb -vv output.

Orico has two models with this chip; the PFM2-C3 and the M2PG-C3. Pluaggable has switched their USBC-NVME from using the JMicron JMS583 to the RTL9210. JEYI makes the i9 GTR and and another where I'm not sure what the model number is. And finally there's a ton of cheapo no-name Chinese brand adapters on the market.

If there is anything I can do to help make this happen, please ask!

Attachments (1)

ticket1315-scsinvme.patch (3.9 KB ) - added by Christian Franke 5 years ago.
Proposed patch

Download all attachments as: .zip

Change History (15)

comment:1 by Christian Franke, 5 years ago

Keywords: nvme usb added; rtl9210 removed
Milestone: undecided

Does smartctl -d sntjmicron ... possibly work?

Do you have any evidence that this USB bridge provides NVMe pass-through functionality (e.g. other tool which could read SMART info) ?

comment:2 by BradGeeeeeeeeeeeeeeeeeee, 5 years ago

I get "Read NVMe Identify Controller failed: scsi error unsupported scsi opcode" when doing a "sudo smartctl -x -d sntjmicron" against it.

Hard Disk Sentinel mentions supporting it: https://www.hdsentinel.com/revision.php

The CrystalDiskInfo changelog mentions support being added in: 8.1.0 [2019/04/22]. I just plugged it into my Windows computer. Yep, it's reading out SMART info.

comment:3 by Christian Franke, 5 years ago

Milestone: undecidedunscheduled

Thanks for testing.

The commit b343c85 from CrystalDiskInfo source code shows the following CDB settings:

CDB Id_Ctrl Smart Comment
0 0xe4 0xe4 NVMe pass-through command
1 0x00 0x00 (transfer_size & 0xff)
2 0x10 0x02 (transfer_size >> 8)
3 0x06 0x02 CDW0.byte0
4 0x01 0x00 CDW10.byte0 | ?
5..15 0 0 ?

Possibly very limited pass-through interface without ability to pass CDW10 and NSID.

Related: ticket #1221.

comment:4 by BradGeeeeeeeeeeeeeeeeeee, 5 years ago

I noticed the following Q&A/FAQ item on the Pluggable website:

"Does this adapter support SMART?

A: Yes, our USB-C NVMe Enclosure does support SMART data passthrough! Reading the SMART data is software dependent and requires software capable of reading SMART through the USB to NVMe chipset in the enclosure. Smartmontools is a free, cross platform smart monitoring and checking utility that can read the SMART data from an installed NVMe SSD using the “-d sntjmicron” argument for the JMicon based USBC-NVME enclosures, at the time of writing they have not yet added support for the Realtek based USBC-NVME enclosures, this document will be updated when support has been confirmed"

https://plugable.com/products/usbc-nvme/

Pluggable is a Linux-friendly company out of the Seattle WA USA area. Given their apparent interest, it might be worth your time to ask if they might give you access to vendor data sheets or at least send you an eval unit.

Their old version of this model ran with a jmicron chip. Apparently it had so many problems they switched to the realtek chip. I know I personally sought out a realtek-based adapter because of compatibility problems with a jmicron adapter I had tried previously.

in reply to:  4 comment:5 by Christian Franke, 5 years ago

Pluggable is a Linux-friendly company out of the Seattle WA USA area. Given their apparent interest, it might be worth your time to ask if they might give you access to vendor data sheets or at least send you an eval unit.

Done. The first reply was very positive.

comment:6 by Christian Franke, 5 years ago

Milestone: unscheduledRelease 7.2

comment:7 by Christian Franke, 5 years ago

Owner: set to Christian Franke
Status: newaccepted

Work is in progress...

comment:8 by BradGeeeeeeeeeeeeeeeeeee, 5 years ago

If you want me to build and test, I can do that. Just let me know when you check in your changes.

comment:9 by Christian Franke, 5 years ago

If you want me to build and test, I can do that....

Thanks. Please test the attached patch and report the test result and the used enclosure and SSD. It works with Plugable enclosure and Samsung 970 EVO Plus.

by Christian Franke, 5 years ago

Attachment: ticket1315-scsinvme.patch added

Proposed patch

comment:10 by BradGeeeeeeeeeeeeeeeeeee, 5 years ago

My adapter is a generic chinese no-name and the NVME installed is a Samsung 960 EVO 250GB.

Looks fancy pants:

[~/tmp/smartmontools/smartmontools-7.1]
user@host> sudo ./smartctl -d sntrealtek -x /dev/disk/by-id/usb-Samsung_SSD_960_EVO_250G_012345678901-0\:0
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.5.0-2-amd64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Samsung SSD 960 EVO 250GB
Serial Number:                      S3ERX0J303826N
Firmware Version:                   2B7QCXE7
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 250,059,350,016 [250 GB]
Unallocated NVM Capacity:           0
Controller ID:                      2
Number of Namespaces:               1
Namespace 1 Size/Capacity:          250,059,350,016 [250 GB]
Namespace 1 Utilization:            195,725,938,688 [195 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            002538 5371b03c89
Local Time is:                      Wed Apr 22 11:16:48 2020 PDT
Firmware Updates (0x16):            3 Slots, no Reset required
Optional Admin Commands (0x0007):   Security Format Frmw_DL
Optional NVM Commands (0x001f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat
Maximum Data Transfer Size:         512 Pages
Warning  Comp. Temp. Threshold:     77 Celsius
Critical Comp. Temp. Threshold:     79 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.04W       -        -    0  0  0  0        0       0
 1 +     5.09W       -        -    1  1  1  1        0       0
 2 +     4.08W       -        -    2  2  2  2        0       0
 3 -   0.0400W       -        -    3  3  3  3      210    1500
 4 -   0.0050W       -        -    4  4  4  4     2200    6000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        24 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    17%
Data Units Read:                    15,273,759 [7.82 TB]
Data Units Written:                 10,417,127 [5.33 TB]
Host Read Commands:                 217,097,306
Host Write Commands:                118,938,655
Controller Busy Time:               1,856
Power Cycles:                       962
Power On Hours:                     10,341
Unsafe Shutdowns:                   107
Media and Data Integrity Errors:    0
Error Information Log Entries:      2
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               24 Celsius
Temperature Sensor 2:               25 Celsius

Error Information (NVMe Log 0x01, max 64 entries)
Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS
  0          2     0  0x00a8  0x4004      -            0     0     -
  1          1     0  0x009f  0x4004      -            0     0     -


comment:11 by Christian Franke, 5 years ago

Resolution: fixed
Status: acceptedclosed

comment:12 by Christian Franke, 5 years ago

Successfully tested with Plugable NVMe enclosure and Samsung 970 EVO Plus. The -d sntrealtek option is not needed for USB Id 0x0bda:0x9210.

Please test if possible. Source tarballs and various binaries are available at https://builds.smartmontools.org/.

comment:13 by BradGeeeeeeeeeeeeeeeeeee, 5 years ago

Tested Build #949 smartmontools-linux-x86_64-static-7.2-r5053.tar.gz. Works as expected.

comment:14 by rs11, 23 months ago

References to #1315

Version 0, edited 23 months ago by rs11 (next)
Note: See TracTickets for help on using tickets.