aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-01-08 09:15:14 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 13:02:52 -0500
commit078fd7d6308a30121b80c297e9b38a2e53711942 (patch)
treec0578da0db59e9912437aa7f2423d233d9a2fe61 /drivers/usb/storage
parentf26d29e34e203296140334087fa3c81168626d76 (diff)
uas: Do not blacklist ASM1153 disk enclosures
Our detection logic to avoid doing UAS on ASM1051 bridge chips causes problems with newer ASM1153 disk enclosures in 2 ways: 1) Some ASM1153 disk enclosures re-use the ASM1051 device-id of 5106, which we assume is always an ASM1051, so remove the quirk for 5106, and instead use the same detection logic as we already use for device-id 55aa, which is used for all of ASM1051, ASM1053 and ASM1153 devices <sigh>. 2) Our detection logic to differentiate between ASM1051 and ASM1053 sees ASM1153 devices as ASM1051 because they have 32 streams like ASM1051 devs. Luckily the ASM1153 descriptors are not 100% identical, unlike the previous models the ASM1153 has bMaxPower == 0, so use that to differentiate it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas-detect.h33
-rw-r--r--drivers/usb/storage/unusual_uas.h8
2 files changed, 28 insertions, 13 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 8a6f371ed6e7..9893d696fc97 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -69,16 +69,39 @@ static int uas_use_uas_driver(struct usb_interface *intf,
69 return 0; 69 return 0;
70 70
71 /* 71 /*
72 * ASM1051 and older ASM1053 devices have the same usb-id, and UAS is 72 * ASMedia has a number of usb3 to sata bridge chips, at the time of
73 * broken on the ASM1051, use the number of streams to differentiate. 73 * this writing the following versions exist:
74 * New ASM1053-s also support 32 streams, but have a different prod-id. 74 * ASM1051 - no uas support version
75 * ASM1051 - with broken (*) uas support
76 * ASM1053 - with working uas support
77 * ASM1153 - with working uas support
78 *
79 * Devices with these chips re-use a number of device-ids over the
80 * entire line, so the device-id is useless to determine if we're
81 * dealing with an ASM1051 (which we want to avoid).
82 *
83 * The ASM1153 can be identified by config.MaxPower == 0,
84 * where as the ASM105x models have config.MaxPower == 36.
85 *
86 * Differentiating between the ASM1053 and ASM1051 is trickier, when
87 * connected over USB-3 we can look at the number of streams supported,
88 * ASM1051 supports 32 streams, where as early ASM1053 versions support
89 * 16 streams, newer ASM1053-s also support 32 streams, but have a
90 * different prod-id.
91 *
92 * (*) ASM1051 chips do work with UAS with some disks (with the
93 * US_FL_NO_REPORT_OPCODES quirk), but are broken with other disks
75 */ 94 */
76 if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c && 95 if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c &&
77 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa) { 96 (le16_to_cpu(udev->descriptor.idProduct) == 0x5106 ||
78 if (udev->speed < USB_SPEED_SUPER) { 97 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) {
98 if (udev->actconfig->desc.bMaxPower == 0) {
99 /* ASM1153, do nothing */
100 } else if (udev->speed < USB_SPEED_SUPER) {
79 /* No streams info, assume ASM1051 */ 101 /* No streams info, assume ASM1051 */
80 flags |= US_FL_IGNORE_UAS; 102 flags |= US_FL_IGNORE_UAS;
81 } else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) { 103 } else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
104 /* Possibly an ASM1051, disable uas */
82 flags |= US_FL_IGNORE_UAS; 105 flags |= US_FL_IGNORE_UAS;
83 } 106 }
84 } 107 }
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
index b5e3255d08f7..542a7d152dd1 100644
--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -106,14 +106,6 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
106 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 106 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
107 US_FL_NO_REPORT_OPCODES), 107 US_FL_NO_REPORT_OPCODES),
108 108
109/* Most ASM1051 based devices have issues with uas, blacklist them all */
110/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
111UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x9999,
112 "ASMedia",
113 "ASM1051",
114 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
115 US_FL_IGNORE_UAS),
116
117/* Reported-by: Hans de Goede <hdegoede@redhat.com> */ 109/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
118UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, 110UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
119 "VIA", 111 "VIA",