hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/usb/storage/uas-detect.h
....@@ -116,11 +116,24 @@
116116 if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2)
117117 flags |= US_FL_NO_ATA_1X;
118118
119
+ /*
120
+ * RTL9210-based enclosure from HIKSEMI, MD202 reportedly have issues
121
+ * with UAS. This isn't distinguishable with just idVendor and
122
+ * idProduct, use manufacturer and product too.
123
+ *
124
+ * Reported-by: Hongling Zeng <zenghongling@kylinos.cn>
125
+ */
126
+ if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bda &&
127
+ le16_to_cpu(udev->descriptor.idProduct) == 0x9210 &&
128
+ (udev->manufacturer && !strcmp(udev->manufacturer, "HIKSEMI")) &&
129
+ (udev->product && !strcmp(udev->product, "MD202")))
130
+ flags |= US_FL_IGNORE_UAS;
131
+
119132 usb_stor_adjust_quirks(udev, &flags);
120133
121134 if (flags & US_FL_IGNORE_UAS) {
122135 dev_warn(&udev->dev,
123
- "UAS is blacklisted for this device, using usb-storage instead\n");
136
+ "UAS is ignored for this device, using usb-storage instead\n");
124137 return 0;
125138 }
126139