Lines Matching +full:- +full:alt

1 /* SPDX-License-Identifier: GPL-2.0 */
8 return (intf->desc.bInterfaceClass == USB_CLASS_MASS_STORAGE && in uas_is_interface()
9 intf->desc.bInterfaceSubClass == USB_SC_SCSI && in uas_is_interface()
10 intf->desc.bInterfaceProtocol == USB_PR_UAS); in uas_is_interface()
18 for (i = 0; i < intf->num_altsetting; i++) { in uas_find_uas_alt_setting()
19 struct usb_host_interface *alt = &intf->altsetting[i]; in uas_find_uas_alt_setting() local
21 if (uas_is_interface(alt)) in uas_find_uas_alt_setting()
22 return alt; in uas_find_uas_alt_setting()
28 static int uas_find_endpoints(struct usb_host_interface *alt, in uas_find_endpoints() argument
31 struct usb_host_endpoint *endpoint = alt->endpoint; in uas_find_endpoints()
32 unsigned i, n_endpoints = alt->desc.bNumEndpoints; in uas_find_endpoints()
41 eps[pipe_id - 1] = &endpoint[i]; in uas_find_endpoints()
44 len -= extra[0]; in uas_find_endpoints()
50 return -ENODEV; in uas_find_endpoints()
61 struct usb_hcd *hcd = bus_to_hcd(udev->bus); in uas_use_uas_driver()
62 unsigned long flags = id->driver_info; in uas_use_uas_driver()
63 struct usb_host_interface *alt; in uas_use_uas_driver() local
66 alt = uas_find_uas_alt_setting(intf); in uas_use_uas_driver()
67 if (!alt) in uas_use_uas_driver()
70 r = uas_find_endpoints(alt, eps); in uas_use_uas_driver()
77 * ASM1051 - no uas support version in uas_use_uas_driver()
78 * ASM1051 - with broken (*) uas support in uas_use_uas_driver()
79 * ASM1053 - with working uas support, but problems with large xfers in uas_use_uas_driver()
80 * ASM1153 - with working uas support in uas_use_uas_driver()
82 * Devices with these chips re-use a number of device-ids over the in uas_use_uas_driver()
83 * entire line, so the device-id is useless to determine if we're in uas_use_uas_driver()
90 * connected over USB-3 we can look at the number of streams supported, in uas_use_uas_driver()
92 * 16 streams, newer ASM1053-s also support 32 streams, but have a in uas_use_uas_driver()
93 * different prod-id. in uas_use_uas_driver()
98 if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c && in uas_use_uas_driver()
99 (le16_to_cpu(udev->descriptor.idProduct) == 0x5106 || in uas_use_uas_driver()
100 le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) { in uas_use_uas_driver()
101 if (udev->actconfig->desc.bMaxPower == 0) { in uas_use_uas_driver()
103 } else if (udev->speed < USB_SPEED_SUPER) { in uas_use_uas_driver()
106 } else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) { in uas_use_uas_driver()
115 /* All Seagate disk enclosures have broken ATA pass-through support */ in uas_use_uas_driver()
116 if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2) in uas_use_uas_driver()
122 dev_warn(&udev->dev, in uas_use_uas_driver()
123 "UAS is ignored for this device, using usb-storage instead\n"); in uas_use_uas_driver()
127 if (udev->bus->sg_tablesize == 0) { in uas_use_uas_driver()
128 dev_warn(&udev->dev, in uas_use_uas_driver()
129 "The driver for the USB controller %s does not support scatter-gather which is\n", in uas_use_uas_driver()
130 hcd->driver->description); in uas_use_uas_driver()
131 dev_warn(&udev->dev, in uas_use_uas_driver()
136 if (udev->speed >= USB_SPEED_SUPER && !hcd->can_do_streams) { in uas_use_uas_driver()
137 dev_warn(&udev->dev, in uas_use_uas_driver()
139 hcd_to_bus(hcd)->bus_name); in uas_use_uas_driver()
140 dev_warn(&udev->dev, in uas_use_uas_driver()