aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/uas-detect.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-12 14:59:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-12 14:59:10 -0400
commit90a3c48fbfbfc2451f1edc145acef8b9892ad1e6 (patch)
treeb5260feac8233db4c25b6f705f689f2971745bf7 /drivers/usb/storage/uas-detect.h
parent602b5366292b5c04926c6042a400d1907413b010 (diff)
parente2c60989dc7e9c6fd28d234f70501a8c93c726aa (diff)
Merge tag 'usb-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are some USB and PHY fixes for 3.17-rc5. Nothing major here, just a number of tiny fixes for reported issues, and some new device ids as well. All have been tested in linux-next" * tag 'usb-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (46 commits) xhci: fix oops when xhci resumes from hibernate with hw lpm capable devices usb: xhci: Fix OOPS in xhci error handling code xhci: Fix null pointer dereference if xhci initialization fails storage: Add single-LUN quirk for Jaz USB Adapter uas: Add missing le16_to_cpu calls to asm1051 / asm1053 usb-id check usb: chipidea: msm: Initialize PHY on reset event usb: chipidea: msm: Use USB PHY API to control PHY state usb: hub: take hub->hdev reference when processing from eventlist uas: Disable uas on ASM1051 devices usb: dwc2/gadget: avoid disabling ep0 usb: dwc2/gadget: delay enabling irq once hardware is configured properly usb: dwc2/gadget: do not call disconnect method in pullup usb: dwc2/gadget: break infinite loop in endpoint disable code usb: dwc2/gadget: fix phy initialization sequence usb: dwc2/gadget: fix phy disable sequence uwb: init beacon cache entry before registering uwb device USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker device USB: document the 'u' flag for usb-storage quirks parameter usb: host: xhci: fix compliance mode workaround usb: dwc3: fix TRB completion when multiple TRBs are started ...
Diffstat (limited to 'drivers/usb/storage/uas-detect.h')
-rw-r--r--drivers/usb/storage/uas-detect.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 503ac5c8d80f..8a6f371ed6e7 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -59,10 +59,6 @@ static int uas_use_uas_driver(struct usb_interface *intf,
59 unsigned long flags = id->driver_info; 59 unsigned long flags = id->driver_info;
60 int r, alt; 60 int r, alt;
61 61
62 usb_stor_adjust_quirks(udev, &flags);
63
64 if (flags & US_FL_IGNORE_UAS)
65 return 0;
66 62
67 alt = uas_find_uas_alt_setting(intf); 63 alt = uas_find_uas_alt_setting(intf);
68 if (alt < 0) 64 if (alt < 0)
@@ -72,6 +68,29 @@ static int uas_use_uas_driver(struct usb_interface *intf,
72 if (r < 0) 68 if (r < 0)
73 return 0; 69 return 0;
74 70
71 /*
72 * ASM1051 and older ASM1053 devices have the same usb-id, and UAS is
73 * broken on the ASM1051, use the number of streams to differentiate.
74 * New ASM1053-s also support 32 streams, but have a different prod-id.
75 */
76 if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c &&
77 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa) {
78 if (udev->speed < USB_SPEED_SUPER) {
79 /* No streams info, assume ASM1051 */
80 flags |= US_FL_IGNORE_UAS;
81 } else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) {
82 flags |= US_FL_IGNORE_UAS;
83 }
84 }
85
86 usb_stor_adjust_quirks(udev, &flags);
87
88 if (flags & US_FL_IGNORE_UAS) {
89 dev_warn(&udev->dev,
90 "UAS is blacklisted for this device, using usb-storage instead\n");
91 return 0;
92 }
93
75 if (udev->bus->sg_tablesize == 0) { 94 if (udev->bus->sg_tablesize == 0) {
76 dev_warn(&udev->dev, 95 dev_warn(&udev->dev,
77 "The driver for the USB controller %s does not support scatter-gather which is\n", 96 "The driver for the USB controller %s does not support scatter-gather which is\n",