diff options
author | Milan Broz <gmazyland@gmail.com> | 2023-10-06 12:52:15 +0200 |
---|---|---|
committer | Milan Broz <gmazyland@gmail.com> | 2023-11-04 11:32:28 +0100 |
commit | d5039bfc389adb43b23bb580abf48ce8985048e7 (patch) | |
tree | 95316e42e23b939c999b6528748e9ffced8f2750 | |
parent | 28f036a9c14cdb240746d48345fe85e54718748d (diff) | |
download | linux-opal-test.tar.gz |
WIP: usb-storage,uas: disable security commands (OPAL) for RT9210 chip familyopal-test
Realtek 9210 family (NVME to USB bridge) adapters always set
the write-protected bit for the whole drive if an OPAL locking range
is defined (even if the OPAL locking range just covers part of the disk).
The only way to recover is PSID reset and physical reconnection of the device.
This looks like a wrong implementation of OPAL standard (and I will try
to report it to Realtek as it happens for all firmware versions I have),
but for now, these adapters are unusable for OPAL.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
-rw-r--r-- | drivers/usb/storage/unusual_devs.h | 11 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_uas.h | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 20dcbccb290b36..b32afded85ae53 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1476,6 +1476,17 @@ UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), +/* + * Realtek 9210 family set global write-protection flag + * for any OPAL locking range making device unusable + * Reported-by: Milan Broz <gmazyland@gmail.com> + */ +UNUSUAL_DEV( 0x0bda, 0x9210, 0x0000, 0xffff, + "Realtek", + "USB to NVMe/SATA bridge", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_IGNORE_OPAL), + UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999, "Maxtor", "USB to SATA", diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 1f8c9b16a0fb85..8a32bb1654ed6a 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h @@ -83,6 +83,17 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_LUNS), +/* + * Realtek 9210 family set global write-protection flag + * for any OPAL locking range making device unusable + * Reported-by: Milan Broz <gmazyland@gmail.com> + */ +UNUSUAL_DEV(0x0bda, 0x9210, 0x0000, 0xffff, + "Realtek", + "USB to NVMe/SATA bridge", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_IGNORE_OPAL), + /* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation", |