History

Merge tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB driver fixes from Greg KH: "Here are a number of small USB fixes for 4.4-rc5. All of them have been in linux-next. The majority are gadget and phy issues, with a few new quirks and device ids added as well" * tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (32 commits) USB: add quirk for devices with broken LPM xhci: fix usb2 resume timing and races. usb: musb: fail with error when no DMA controller set usb: gadget: uvc: fix permissions of configfs attributes usb: musb: core: Fix pm runtime for deferred probe usb: phy: msm: fix a possible NULL dereference USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq usb: Quiet down false peer failure messages usb: xhci: fix config fail of FS hub behind a HS hub with MTT xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable() usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message USB: whci-hcd: add check for dma mapping error usb: core : hub: Fix BOS 'NULL pointer' kernel panic USB: quirks: Apply ALWAYS_POLL to all ELAN devices usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron USB: quirks: Fix another ELAN touchscreen usb: dwc3: gadget: don't prestart interrupt endpoints USB: serial: Another Infineon flash loader USB ID USB: cdc_acm: Ignore Infineon Flash Loader utility USB: cp210x: Remove CP2110 ID from compatibility list ...

Linus Torvalds committed 10 years ago

Commit c4740092 parents 097b285 ad87e0330 files · +200 −79Browse files

Unified · Split

30 files
  1. drivers/hid/hid-ids.h +0 −5
  2. drivers/hid/usbhid/hid-quirks.c +3 −6
  3. drivers/usb/class/cdc-acm.c +5 −0
  4. drivers/usb/core/config.c +2 −1
  5. drivers/usb/core/hub.c +14 −8
  6. drivers/usb/core/port.c +2 −2
  7. drivers/usb/core/quirks.c +9 −0
  8. drivers/usb/dwc2/platform.c +53 −28
  9. drivers/usb/dwc3/gadget.c +1 −0
  10. drivers/usb/gadget/function/f_fs.c +3 −3
  11. drivers/usb/gadget/function/f_midi.c +2 −1
  12. drivers/usb/gadget/function/uvc_configfs.c +1 −1
  13. drivers/usb/gadget/udc/pxa27x_udc.c +3 −0
  14. drivers/usb/host/ohci-at91.c +5 −6
  15. drivers/usb/host/whci/qset.c +4 −0
  16. drivers/usb/host/xhci-hub.c +42 −5
  17. drivers/usb/host/xhci-pci.c +6 −2
  18. drivers/usb/host/xhci-ring.c +2 −1
  19. drivers/usb/host/xhci.c +8 −0
  20. drivers/usb/musb/Kconfig +1 −1
  21. drivers/usb/musb/musb_core.c +7 −1
  22. drivers/usb/phy/phy-msm-usb.c +3 −3
  23. drivers/usb/phy/phy-mxs-usb.c +5 −0
  24. drivers/usb/renesas_usbhs/mod_gadget.c +9 −2
  25. drivers/usb/serial/cp210x.c +0 −1
  26. drivers/usb/serial/usb-serial-simple.c +1 −0
  27. drivers/usb/storage/uas.c +4 −0
  28. drivers/usb/storage/unusual_devs.h +1 −1
  29. drivers/usb/storage/unusual_uas.h +1 −1
  30. include/linux/usb/quirks.h +3 −0
drivers/hid/hid-ids.h+0−5
@@ -316,11 +316,6 @@ · 315 unmodified lines
316#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001316#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001
317 317
318#define USB_VENDOR_ID_ELAN 0x04f3318#define USB_VENDOR_ID_ELAN 0x04f3
319#define USB_DEVICE_ID_ELAN_TOUCHSCREEN 0x0089
320#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B 0x009b
321#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103 0x0103
322#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c 0x010c
323#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F 0x016f
324 319
325#define USB_VENDOR_ID_ELECOM 0x056e320#define USB_VENDOR_ID_ELECOM 0x056e
326#define USB_DEVICE_ID_ELECOM_BM084 0x0061321#define USB_DEVICE_ID_ELECOM_BM084 0x0061
drivers/hid/usbhid/hid-quirks.c+3−6
@@ -72,11 +72,7 @@ static const struct hid_blacklist { · 71 unmodified lines
72 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },72 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
73 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },73 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
74 { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },74 { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },
75 { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN, HID_QUIRK_ALWAYS_POLL },75 { USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL },
76 { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B, HID_QUIRK_ALWAYS_POLL },
77 { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103, HID_QUIRK_ALWAYS_POLL },
78 { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c, HID_QUIRK_ALWAYS_POLL },
79 { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F, HID_QUIRK_ALWAYS_POLL },
80 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },76 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
81 { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS },77 { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS },
82 { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },78 { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },
@@ -340,7 +336,8 @@ static const struct hid_blacklist *usbhid_exists_squirk(const u16 idVendor, · 257 unmodified lines
340 336
341 for (; hid_blacklist[n].idVendor; n++)337 for (; hid_blacklist[n].idVendor; n++)
342 if (hid_blacklist[n].idVendor == idVendor &&338 if (hid_blacklist[n].idVendor == idVendor &&
343 hid_blacklist[n].idProduct == idProduct)339 (hid_blacklist[n].idProduct == (__u16) HID_ANY_ID ||
340 hid_blacklist[n].idProduct == idProduct))
344 bl_entry = &hid_blacklist[n];341 bl_entry = &hid_blacklist[n];
345 342
346 if (bl_entry != NULL)343 if (bl_entry != NULL)
drivers/usb/class/cdc-acm.c+5−0
@@ -1838,6 +1838,11 @@ static const struct usb_device_id acm_ids[] = { · 1837 unmodified lines
1838 },1838 },
1839#endif1839#endif
1840 1840
1841 /* Exclude Infineon Flash Loader utility */
1842 { USB_DEVICE(0x058b, 0x0041),
1843 .driver_info = IGNORE_DEVICE,
1844 },
1845
1841 /* control interfaces without any protocol set */1846 /* control interfaces without any protocol set */
1842 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,1847 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
1843 USB_CDC_PROTO_NONE) },1848 USB_CDC_PROTO_NONE) },
drivers/usb/core/config.c+2−1
@@ -115,7 +115,8 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, · 114 unmodified lines
115 USB_SS_MULT(desc->bmAttributes) > 3) {115 USB_SS_MULT(desc->bmAttributes) > 3) {
116 dev_warn(ddev, "Isoc endpoint has Mult of %d in "116 dev_warn(ddev, "Isoc endpoint has Mult of %d in "
117 "config %d interface %d altsetting %d ep %d: "117 "config %d interface %d altsetting %d ep %d: "
118 "setting to 3\n", desc->bmAttributes + 1,118 "setting to 3\n",
119 USB_SS_MULT(desc->bmAttributes),
119 cfgno, inum, asnum, ep->desc.bEndpointAddress);120 cfgno, inum, asnum, ep->desc.bEndpointAddress);
120 ep->ss_ep_comp.bmAttributes = 2;121 ep->ss_ep_comp.bmAttributes = 2;
121 }122 }
drivers/usb/core/hub.c+14−8
@@ -124,6 +124,10 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev) · 123 unmodified lines
124 124
125int usb_device_supports_lpm(struct usb_device *udev)125int usb_device_supports_lpm(struct usb_device *udev)
126{126{
127 /* Some devices have trouble with LPM */
128 if (udev->quirks & USB_QUIRK_NO_LPM)
129 return 0;
130
127 /* USB 2.1 (and greater) devices indicate LPM support through131 /* USB 2.1 (and greater) devices indicate LPM support through
128 * their USB 2.0 Extended Capabilities BOS descriptor.132 * their USB 2.0 Extended Capabilities BOS descriptor.
129 */133 */
@@ -4512,6 +4516,8 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, · 4382 unmodified lines
4512 goto fail;4516 goto fail;
4513 }4517 }
4514 4518
4519 usb_detect_quirks(udev);
4520
4515 if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {4521 if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
4516 retval = usb_get_bos_descriptor(udev);4522 retval = usb_get_bos_descriptor(udev);
4517 if (!retval) {4523 if (!retval) {
@@ -4710,7 +4716,6 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, · 192 unmodified lines
4710 if (status < 0)4716 if (status < 0)
4711 goto loop;4717 goto loop;
4712 4718
4713 usb_detect_quirks(udev);
4714 if (udev->quirks & USB_QUIRK_DELAY_INIT)4719 if (udev->quirks & USB_QUIRK_DELAY_INIT)
4715 msleep(1000);4720 msleep(1000);
4716 4721
@@ -5326,9 +5331,6 @@ static int usb_reset_and_verify_device(struct usb_device *udev) · 609 unmodified lines
5326 if (udev->usb2_hw_lpm_enabled == 1)5331 if (udev->usb2_hw_lpm_enabled == 1)
5327 usb_set_usb2_hardware_lpm(udev, 0);5332 usb_set_usb2_hardware_lpm(udev, 0);
5328 5333
5329 bos = udev->bos;
5330 udev->bos = NULL;
5331
5332 /* Disable LPM and LTM while we reset the device and reinstall the alt5334 /* Disable LPM and LTM while we reset the device and reinstall the alt
5333 * settings. Device-initiated LPM settings, and system exit latency5335 * settings. Device-initiated LPM settings, and system exit latency
5334 * settings are cleared when the device is reset, so we have to set5336 * settings are cleared when the device is reset, so we have to set
@@ -5337,15 +5339,18 @@ static int usb_reset_and_verify_device(struct usb_device *udev) · 2 unmodified lines
5337 ret = usb_unlocked_disable_lpm(udev);5339 ret = usb_unlocked_disable_lpm(udev);
5338 if (ret) {5340 if (ret) {
5339 dev_err(&udev->dev, "%s Failed to disable LPM\n.", __func__);5341 dev_err(&udev->dev, "%s Failed to disable LPM\n.", __func__);
5340 goto re_enumerate;5342 goto re_enumerate_no_bos;
5341 }5343 }
5342 ret = usb_disable_ltm(udev);5344 ret = usb_disable_ltm(udev);
5343 if (ret) {5345 if (ret) {
5344 dev_err(&udev->dev, "%s Failed to disable LTM\n.",5346 dev_err(&udev->dev, "%s Failed to disable LTM\n.",
5345 __func__);5347 __func__);
5346 goto re_enumerate;5348 goto re_enumerate_no_bos;
5347 }5349 }
5348 5350
5351 bos = udev->bos;
5352 udev->bos = NULL;
5353
5349 for (i = 0; i < SET_CONFIG_TRIES; ++i) {5354 for (i = 0; i < SET_CONFIG_TRIES; ++i) {
5350 5355
5351 /* ep0 maxpacket size may change; let the HCD know about it.5356 /* ep0 maxpacket size may change; let the HCD know about it.
@@ -5442,10 +5447,11 @@ done: · 90 unmodified lines
5442 return 0;5447 return 0;
5443 5448
5444re_enumerate:5449re_enumerate:
5445 /* LPM state doesn't matter when we're about to destroy the device. */
5446 hub_port_logical_disconnect(parent_hub, port1);
5447 usb_release_bos_descriptor(udev);5450 usb_release_bos_descriptor(udev);
5448 udev->bos = bos;5451 udev->bos = bos;
5452re_enumerate_no_bos:
5453 /* LPM state doesn't matter when we're about to destroy the device. */
5454 hub_port_logical_disconnect(parent_hub, port1);
5449 return -ENODEV;5455 return -ENODEV;
5450}5456}
5451 5457
drivers/usb/core/port.c+2−2
@@ -206,7 +206,7 @@ static int link_peers(struct usb_port *left, struct usb_port *right) · 205 unmodified lines
206 else206 else
207 method = "default";207 method = "default";
208 208
209 pr_warn("usb: failed to peer %s and %s by %s (%s:%s) (%s:%s)\n",209 pr_debug("usb: failed to peer %s and %s by %s (%s:%s) (%s:%s)\n",
210 dev_name(&left->dev), dev_name(&right->dev), method,210 dev_name(&left->dev), dev_name(&right->dev), method,
211 dev_name(&left->dev),211 dev_name(&left->dev),
212 lpeer ? dev_name(&lpeer->dev) : "none",212 lpeer ? dev_name(&lpeer->dev) : "none",
@@ -265,7 +265,7 @@ static void link_peers_report(struct usb_port *left, struct usb_port *right) · 52 unmodified lines
265 if (rc == 0) {265 if (rc == 0) {
266 dev_dbg(&left->dev, "peered to %s\n", dev_name(&right->dev));266 dev_dbg(&left->dev, "peered to %s\n", dev_name(&right->dev));
267 } else {267 } else {
268 dev_warn(&left->dev, "failed to peer to %s (%d)\n",268 dev_dbg(&left->dev, "failed to peer to %s (%d)\n",
269 dev_name(&right->dev), rc);269 dev_name(&right->dev), rc);
270 pr_warn_once("usb: port power management may be unreliable\n");270 pr_warn_once("usb: port power management may be unreliable\n");
271 usb_port_block_power_off = 1;271 usb_port_block_power_off = 1;
drivers/usb/core/quirks.c+9−0
@@ -125,6 +125,9 @@ static const struct usb_device_id usb_quirk_list[] = { · 124 unmodified lines
125 { USB_DEVICE(0x04f3, 0x016f), .driver_info =125 { USB_DEVICE(0x04f3, 0x016f), .driver_info =
126 USB_QUIRK_DEVICE_QUALIFIER },126 USB_QUIRK_DEVICE_QUALIFIER },
127 127
128 { USB_DEVICE(0x04f3, 0x21b8), .driver_info =
129 USB_QUIRK_DEVICE_QUALIFIER },
130
128 /* Roland SC-8820 */131 /* Roland SC-8820 */
129 { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },132 { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },
130 133
@@ -199,6 +202,12 @@ static const struct usb_device_id usb_quirk_list[] = { · 68 unmodified lines
199 { USB_DEVICE(0x1a0a, 0x0200), .driver_info =202 { USB_DEVICE(0x1a0a, 0x0200), .driver_info =
200 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },203 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
201 204
205 /* Blackmagic Design Intensity Shuttle */
206 { USB_DEVICE(0x1edb, 0xbd3b), .driver_info = USB_QUIRK_NO_LPM },
207
208 /* Blackmagic Design UltraStudio SDI */
209 { USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM },
210
202 { } /* terminating entry must be last */211 { } /* terminating entry must be last */
203};212};
204 213
drivers/usb/dwc2/platform.c+53−28
@@ -125,9 +125,11 @@ static int __dwc2_lowlevel_hw_enable(struct dwc2_hsotg *hsotg) · 124 unmodified lines
125 if (ret)125 if (ret)
126 return ret;126 return ret;
127 127
128 ret = clk_prepare_enable(hsotg->clk);128 if (hsotg->clk) {
129 if (ret)129 ret = clk_prepare_enable(hsotg->clk);
130 return ret;130 if (ret)
131 return ret;
132 }
131 133
132 if (hsotg->uphy)134 if (hsotg->uphy)
133 ret = usb_phy_init(hsotg->uphy);135 ret = usb_phy_init(hsotg->uphy);
@@ -175,7 +177,8 @@ static int __dwc2_lowlevel_hw_disable(struct dwc2_hsotg *hsotg) · 41 unmodified lines
175 if (ret)177 if (ret)
176 return ret;178 return ret;
177 179
178 clk_disable_unprepare(hsotg->clk);180 if (hsotg->clk)
181 clk_disable_unprepare(hsotg->clk);
179 182
180 ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),183 ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
181 hsotg->supplies);184 hsotg->supplies);
@@ -212,14 +215,41 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg) · 30 unmodified lines
212 */215 */
213 hsotg->phy = devm_phy_get(hsotg->dev, "usb2-phy");216 hsotg->phy = devm_phy_get(hsotg->dev, "usb2-phy");
214 if (IS_ERR(hsotg->phy)) {217 if (IS_ERR(hsotg->phy)) {
215 hsotg->phy = NULL;218 ret = PTR_ERR(hsotg->phy);
219 switch (ret) {
220 case -ENODEV:
221 case -ENOSYS:
222 hsotg->phy = NULL;
223 break;
224 case -EPROBE_DEFER:
225 return ret;
226 default:
227 dev_err(hsotg->dev, "error getting phy %d\n", ret);
228 return ret;
229 }
230 }
231
232 if (!hsotg->phy) {
216 hsotg->uphy = devm_usb_get_phy(hsotg->dev, USB_PHY_TYPE_USB2);233 hsotg->uphy = devm_usb_get_phy(hsotg->dev, USB_PHY_TYPE_USB2);
217 if (IS_ERR(hsotg->uphy))234 if (IS_ERR(hsotg->uphy)) {
218 hsotg->uphy = NULL;235 ret = PTR_ERR(hsotg->uphy);
219 else236 switch (ret) {
220 hsotg->plat = dev_get_platdata(hsotg->dev);237 case -ENODEV:
238 case -ENXIO:
239 hsotg->uphy = NULL;
240 break;
241 case -EPROBE_DEFER:
242 return ret;
243 default:
244 dev_err(hsotg->dev, "error getting usb phy %d\n",
245 ret);
246 return ret;
247 }
248 }
221 }249 }
222 250
251 hsotg->plat = dev_get_platdata(hsotg->dev);
252
223 if (hsotg->phy) {253 if (hsotg->phy) {
224 /*254 /*
225 * If using the generic PHY framework, check if the PHY bus255 * If using the generic PHY framework, check if the PHY bus
@@ -229,11 +259,6 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg) · 3 unmodified lines
229 hsotg->phyif = GUSBCFG_PHYIF8;259 hsotg->phyif = GUSBCFG_PHYIF8;
230 }260 }
231 261
232 if (!hsotg->phy && !hsotg->uphy && !hsotg->plat) {
233 dev_err(hsotg->dev, "no platform data or transceiver defined\n");
234 return -EPROBE_DEFER;
235 }
236
237 /* Clock */262 /* Clock */
238 hsotg->clk = devm_clk_get(hsotg->dev, "otg");263 hsotg->clk = devm_clk_get(hsotg->dev, "otg");
239 if (IS_ERR(hsotg->clk)) {264 if (IS_ERR(hsotg->clk)) {
@@ -342,20 +367,6 @@ static int dwc2_driver_probe(struct platform_device *dev) · 102 unmodified lines
342 if (retval)367 if (retval)
343 return retval;368 return retval;
344 369
345 irq = platform_get_irq(dev, 0);
346 if (irq < 0) {
347 dev_err(&dev->dev, "missing IRQ resource\n");
348 return irq;
349 }
350
351 dev_dbg(hsotg->dev, "registering common handler for irq%d\n",
352 irq);
353 retval = devm_request_irq(hsotg->dev, irq,
354 dwc2_handle_common_intr, IRQF_SHARED,
355 dev_name(hsotg->dev), hsotg);
356 if (retval)
357 return retval;
358
359 res = platform_get_resource(dev, IORESOURCE_MEM, 0);370 res = platform_get_resource(dev, IORESOURCE_MEM, 0);
360 hsotg->regs = devm_ioremap_resource(&dev->dev, res);371 hsotg->regs = devm_ioremap_resource(&dev->dev, res);
361 if (IS_ERR(hsotg->regs))372 if (IS_ERR(hsotg->regs))
@@ -390,6 +401,20 @@ static int dwc2_driver_probe(struct platform_device *dev) · 28 unmodified lines
390 401
391 dwc2_set_all_params(hsotg->core_params, -1);402 dwc2_set_all_params(hsotg->core_params, -1);
392 403
404 irq = platform_get_irq(dev, 0);
405 if (irq < 0) {
406 dev_err(&dev->dev, "missing IRQ resource\n");
407 return irq;
408 }
409
410 dev_dbg(hsotg->dev, "registering common handler for irq%d\n",
411 irq);
412 retval = devm_request_irq(hsotg->dev, irq,
413 dwc2_handle_common_intr, IRQF_SHARED,
414 dev_name(hsotg->dev), hsotg);
415 if (retval)
416 return retval;
417
393 retval = dwc2_lowlevel_hw_enable(hsotg);418 retval = dwc2_lowlevel_hw_enable(hsotg);
394 if (retval)419 if (retval)
395 return retval;420 return retval;
drivers/usb/dwc3/gadget.c+1−0
@@ -1078,6 +1078,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) · 1077 unmodified lines
1078 * little bit faster.1078 * little bit faster.
1079 */1079 */
1080 if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) &&1080 if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
1081 !usb_endpoint_xfer_int(dep->endpoint.desc) &&
1081 !(dep->flags & DWC3_EP_BUSY)) {1082 !(dep->flags & DWC3_EP_BUSY)) {
1082 ret = __dwc3_gadget_kick_transfer(dep, 0, true);1083 ret = __dwc3_gadget_kick_transfer(dep, 0, true);
1083 goto out;1084 goto out;
drivers/usb/gadget/function/f_fs.c+3−3
@@ -423,7 +423,7 @@ static ssize_t __ffs_ep0_read_events(struct ffs_data *ffs, char __user *buf, · 422 unmodified lines
423 spin_unlock_irq(&ffs->ev.waitq.lock);423 spin_unlock_irq(&ffs->ev.waitq.lock);
424 mutex_unlock(&ffs->mutex);424 mutex_unlock(&ffs->mutex);
425 425
426 return unlikely(__copy_to_user(buf, events, size)) ? -EFAULT : size;426 return unlikely(copy_to_user(buf, events, size)) ? -EFAULT : size;
427}427}
428 428
429static ssize_t ffs_ep0_read(struct file *file, char __user *buf,429static ssize_t ffs_ep0_read(struct file *file, char __user *buf,
@@ -513,7 +513,7 @@ static ssize_t ffs_ep0_read(struct file *file, char __user *buf, · 83 unmodified lines
513 513
514 /* unlocks spinlock */514 /* unlocks spinlock */
515 ret = __ffs_ep0_queue_wait(ffs, data, len);515 ret = __ffs_ep0_queue_wait(ffs, data, len);
516 if (likely(ret > 0) && unlikely(__copy_to_user(buf, data, len)))516 if (likely(ret > 0) && unlikely(copy_to_user(buf, data, len)))
517 ret = -EFAULT;517 ret = -EFAULT;
518 goto done_mutex;518 goto done_mutex;
519 519
@@ -3493,7 +3493,7 @@ static char *ffs_prepare_buffer(const char __user *buf, size_t len) · 2973 unmodified lines
3493 if (unlikely(!data))3493 if (unlikely(!data))
3494 return ERR_PTR(-ENOMEM);3494 return ERR_PTR(-ENOMEM);
3495 3495
3496 if (unlikely(__copy_from_user(data, buf, len))) {3496 if (unlikely(copy_from_user(data, buf, len))) {
3497 kfree(data);3497 kfree(data);
3498 return ERR_PTR(-EFAULT);3498 return ERR_PTR(-EFAULT);
3499 }3499 }
drivers/usb/gadget/function/f_midi.c+2−1
@@ -370,6 +370,7 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) · 369 unmodified lines
370 if (err) {370 if (err) {
371 ERROR(midi, "%s queue req: %d\n",371 ERROR(midi, "%s queue req: %d\n",
372 midi->out_ep->name, err);372 midi->out_ep->name, err);
373 free_ep_req(midi->out_ep, req);
373 }374 }
374 }375 }
375 376
@@ -545,7 +546,7 @@ static void f_midi_transmit(struct f_midi *midi, struct usb_request *req) · 169 unmodified lines
545 }546 }
546 }547 }
547 548
548 if (req->length > 0) {549 if (req->length > 0 && ep->enabled) {
549 int err;550 int err;
550 551
551 err = usb_ep_queue(ep, req, GFP_ATOMIC);552 err = usb_ep_queue(ep, req, GFP_ATOMIC);
drivers/usb/gadget/function/uvc_configfs.c+1−1
@@ -20,7 +20,7 @@ · 19 unmodified lines
20#define UVC_ATTR(prefix, cname, aname) \20#define UVC_ATTR(prefix, cname, aname) \
21static struct configfs_attribute prefix##attr_##cname = { \21static struct configfs_attribute prefix##attr_##cname = { \
22 .ca_name = __stringify(aname), \22 .ca_name = __stringify(aname), \
23 .ca_mode = S_IRUGO, \23 .ca_mode = S_IRUGO | S_IWUGO, \
24 .ca_owner = THIS_MODULE, \24 .ca_owner = THIS_MODULE, \
25 .show = prefix##cname##_show, \25 .show = prefix##cname##_show, \
26 .store = prefix##cname##_store, \26 .store = prefix##cname##_store, \
drivers/usb/gadget/udc/pxa27x_udc.c+3−0
@@ -2536,6 +2536,9 @@ static int pxa_udc_suspend(struct platform_device *_dev, pm_message_t state) · 2535 unmodified lines
2536 udc->pullup_resume = udc->pullup_on;2536 udc->pullup_resume = udc->pullup_on;
2537 dplus_pullup(udc, 0);2537 dplus_pullup(udc, 0);
2538 2538
2539 if (udc->driver)
2540 udc->driver->disconnect(&udc->gadget);
2541
2539 return 0;2542 return 0;
2540}2543}
2541 2544
drivers/usb/host/ohci-at91.c+5−6
@@ -473,6 +473,8 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) · 472 unmodified lines
473 if (!pdata)473 if (!pdata)
474 return -ENOMEM;474 return -ENOMEM;
475 475
476 pdev->dev.platform_data = pdata;
477
476 if (!of_property_read_u32(np, "num-ports", &ports))478 if (!of_property_read_u32(np, "num-ports", &ports))
477 pdata->ports = ports;479 pdata->ports = ports;
478 480
@@ -483,6 +485,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) · 4 unmodified lines
483 */485 */
484 if (i >= pdata->ports) {486 if (i >= pdata->ports) {
485 pdata->vbus_pin[i] = -EINVAL;487 pdata->vbus_pin[i] = -EINVAL;
488 pdata->overcurrent_pin[i] = -EINVAL;
486 continue;489 continue;
487 }490 }
488 491
@@ -513,10 +516,8 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) · 24 unmodified lines
513 }516 }
514 517
515 at91_for_each_port(i) {518 at91_for_each_port(i) {
516 if (i >= pdata->ports) {519 if (i >= pdata->ports)
517 pdata->overcurrent_pin[i] = -EINVAL;520 break;
518 continue;
519 }
520 521
521 pdata->overcurrent_pin[i] =522 pdata->overcurrent_pin[i] =
522 of_get_named_gpio_flags(np, "atmel,oc-gpio", i, &flags);523 of_get_named_gpio_flags(np, "atmel,oc-gpio", i, &flags);
@@ -552,8 +553,6 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) · 29 unmodified lines
552 }553 }
553 }554 }
554 555
555 pdev->dev.platform_data = pdata;
556
557 device_init_wakeup(&pdev->dev, 1);556 device_init_wakeup(&pdev->dev, 1);
558 return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);557 return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
559}558}
drivers/usb/host/whci/qset.c+4−0
@@ -377,6 +377,10 @@ static int qset_fill_page_list(struct whc *whc, struct whc_std *std, gfp_t mem_f · 376 unmodified lines
377 if (std->pl_virt == NULL)377 if (std->pl_virt == NULL)
378 return -ENOMEM;378 return -ENOMEM;
379 std->dma_addr = dma_map_single(whc->wusbhc.dev, std->pl_virt, pl_len, DMA_TO_DEVICE);379 std->dma_addr = dma_map_single(whc->wusbhc.dev, std->pl_virt, pl_len, DMA_TO_DEVICE);
380 if (dma_mapping_error(whc->wusbhc.dev, std->dma_addr)) {
381 kfree(std->pl_virt);
382 return -EFAULT;
383 }
380 384
381 for (p = 0; p < std->num_pointers; p++) {385 for (p = 0; p < std->num_pointers; p++) {
382 std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);386 std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);
drivers/usb/host/xhci-hub.c+42−5
@@ -733,8 +733,30 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, · 732 unmodified lines
733 if ((raw_port_status & PORT_RESET) ||733 if ((raw_port_status & PORT_RESET) ||
734 !(raw_port_status & PORT_PE))734 !(raw_port_status & PORT_PE))
735 return 0xffffffff;735 return 0xffffffff;
736 if (time_after_eq(jiffies,736 /* did port event handler already start resume timing? */
737 bus_state->resume_done[wIndex])) {737 if (!bus_state->resume_done[wIndex]) {
738 /* If not, maybe we are in a host initated resume? */
739 if (test_bit(wIndex, &bus_state->resuming_ports)) {
740 /* Host initated resume doesn't time the resume
741 * signalling using resume_done[].
742 * It manually sets RESUME state, sleeps 20ms
743 * and sets U0 state. This should probably be
744 * changed, but not right now.
745 */
746 } else {
747 /* port resume was discovered now and here,
748 * start resume timing
749 */
750 unsigned long timeout = jiffies +
751 msecs_to_jiffies(USB_RESUME_TIMEOUT);
752
753 set_bit(wIndex, &bus_state->resuming_ports);
754 bus_state->resume_done[wIndex] = timeout;
755 mod_timer(&hcd->rh_timer, timeout);
756 }
757 /* Has resume been signalled for USB_RESUME_TIME yet? */
758 } else if (time_after_eq(jiffies,
759 bus_state->resume_done[wIndex])) {
738 int time_left;760 int time_left;
739 761
740 xhci_dbg(xhci, "Resume USB2 port %d\n",762 xhci_dbg(xhci, "Resume USB2 port %d\n",
@@ -775,13 +797,26 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, · 34 unmodified lines
775 } else {797 } else {
776 /*798 /*
777 * The resume has been signaling for less than799 * The resume has been signaling for less than
778 * 20ms. Report the port status as SUSPEND,800 * USB_RESUME_TIME. Report the port status as SUSPEND,
779 * let the usbcore check port status again801 * let the usbcore check port status again and clear
780 * and clear resume signaling later.802 * resume signaling later.
781 */803 */
782 status |= USB_PORT_STAT_SUSPEND;804 status |= USB_PORT_STAT_SUSPEND;
783 }805 }
784 }806 }
807 /*
808 * Clear stale usb2 resume signalling variables in case port changed
809 * state during resume signalling. For example on error
810 */
811 if ((bus_state->resume_done[wIndex] ||
812 test_bit(wIndex, &bus_state->resuming_ports)) &&
813 (raw_port_status & PORT_PLS_MASK) != XDEV_U3 &&
814 (raw_port_status & PORT_PLS_MASK) != XDEV_RESUME) {
815 bus_state->resume_done[wIndex] = 0;
816 clear_bit(wIndex, &bus_state->resuming_ports);
817 }
818
819
785 if ((raw_port_status & PORT_PLS_MASK) == XDEV_U0 &&820 if ((raw_port_status & PORT_PLS_MASK) == XDEV_U0 &&
786 (raw_port_status & PORT_POWER)) {821 (raw_port_status & PORT_POWER)) {
787 if (bus_state->suspended_ports & (1 << wIndex)) {822 if (bus_state->suspended_ports & (1 << wIndex)) {
@@ -1115,6 +1150,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 327 unmodified lines
1115 if ((temp & PORT_PE) == 0)1150 if ((temp & PORT_PE) == 0)
1116 goto error;1151 goto error;
1117 1152
1153 set_bit(wIndex, &bus_state->resuming_ports);
1118 xhci_set_link_state(xhci, port_array, wIndex,1154 xhci_set_link_state(xhci, port_array, wIndex,
1119 XDEV_RESUME);1155 XDEV_RESUME);
1120 spin_unlock_irqrestore(&xhci->lock, flags);1156 spin_unlock_irqrestore(&xhci->lock, flags);
@@ -1122,6 +1158,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 1 unmodified line
1122 spin_lock_irqsave(&xhci->lock, flags);1158 spin_lock_irqsave(&xhci->lock, flags);
1123 xhci_set_link_state(xhci, port_array, wIndex,1159 xhci_set_link_state(xhci, port_array, wIndex,
1124 XDEV_U0);1160 XDEV_U0);
1161 clear_bit(wIndex, &bus_state->resuming_ports);
1125 }1162 }
1126 bus_state->port_c_suspend |= 1 << wIndex;1163 bus_state->port_c_suspend |= 1 << wIndex;
1127 1164
drivers/usb/host/xhci-pci.c+6−2
@@ -188,10 +188,14 @@ static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) · 187 unmodified lines
188 0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45,188 0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45,
189 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,189 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
190 };190 };
191 acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1, NULL);191 union acpi_object *obj;
192
193 obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1,
194 NULL);
195 ACPI_FREE(obj);
192}196}
193#else197#else
194 static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }198static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
195#endif /* CONFIG_ACPI */199#endif /* CONFIG_ACPI */
196 200
197/* called during probe() after chip reset completes */201/* called during probe() after chip reset completes */
drivers/usb/host/xhci-ring.c+2−1
@@ -1583,7 +1583,8 @@ static void handle_port_status(struct xhci_hcd *xhci, · 1582 unmodified lines
1583 */1583 */
1584 bogus_port_status = true;1584 bogus_port_status = true;
1585 goto cleanup;1585 goto cleanup;
1586 } else {1586 } else if (!test_bit(faked_port_index,
1587 &bus_state->resuming_ports)) {
1587 xhci_dbg(xhci, "resume HS port %d\n", port_id);1588 xhci_dbg(xhci, "resume HS port %d\n", port_id);
1588 bus_state->resume_done[faked_port_index] = jiffies +1589 bus_state->resume_done[faked_port_index] = jiffies +
1589 msecs_to_jiffies(USB_RESUME_TIMEOUT);1590 msecs_to_jiffies(USB_RESUME_TIMEOUT);
drivers/usb/host/xhci.c+8−0
@@ -4778,8 +4778,16 @@ int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, · 4777 unmodified lines
4778 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG);4778 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG);
4779 slot_ctx = xhci_get_slot_ctx(xhci, config_cmd->in_ctx);4779 slot_ctx = xhci_get_slot_ctx(xhci, config_cmd->in_ctx);
4780 slot_ctx->dev_info |= cpu_to_le32(DEV_HUB);4780 slot_ctx->dev_info |= cpu_to_le32(DEV_HUB);
4781 /*
4782 * refer to section 6.2.2: MTT should be 0 for full speed hub,
4783 * but it may be already set to 1 when setup an xHCI virtual
4784 * device, so clear it anyway.
4785 */
4781 if (tt->multi)4786 if (tt->multi)
4782 slot_ctx->dev_info |= cpu_to_le32(DEV_MTT);4787 slot_ctx->dev_info |= cpu_to_le32(DEV_MTT);
4788 else if (hdev->speed == USB_SPEED_FULL)
4789 slot_ctx->dev_info &= cpu_to_le32(~DEV_MTT);
4790
4783 if (xhci->hci_version > 0x95) {4791 if (xhci->hci_version > 0x95) {
4784 xhci_dbg(xhci, "xHCI version %x needs hub "4792 xhci_dbg(xhci, "xHCI version %x needs hub "
4785 "TT think time and number of ports\n",4793 "TT think time and number of ports\n",
drivers/usb/musb/Kconfig+1−1
@@ -159,7 +159,7 @@ config USB_TI_CPPI_DMA · 158 unmodified lines
159 159
160config USB_TI_CPPI41_DMA160config USB_TI_CPPI41_DMA
161 bool 'TI CPPI 4.1 (AM335x)'161 bool 'TI CPPI 4.1 (AM335x)'
162 depends on ARCH_OMAP162 depends on ARCH_OMAP && DMADEVICES
163 select TI_CPPI41163 select TI_CPPI41
164 164
165config USB_TUSB_OMAP_DMA165config USB_TUSB_OMAP_DMA
drivers/usb/musb/musb_core.c+7−1
@@ -2017,7 +2017,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) · 2016 unmodified lines
2017 /* We need musb_read/write functions initialized for PM */2017 /* We need musb_read/write functions initialized for PM */
2018 pm_runtime_use_autosuspend(musb->controller);2018 pm_runtime_use_autosuspend(musb->controller);
2019 pm_runtime_set_autosuspend_delay(musb->controller, 200);2019 pm_runtime_set_autosuspend_delay(musb->controller, 200);
2020 pm_runtime_irq_safe(musb->controller);
2021 pm_runtime_enable(musb->controller);2020 pm_runtime_enable(musb->controller);
2022 2021
2023 /* The musb_platform_init() call:2022 /* The musb_platform_init() call:
@@ -2095,6 +2094,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) · 71 unmodified lines
2095#ifndef CONFIG_MUSB_PIO_ONLY2094#ifndef CONFIG_MUSB_PIO_ONLY
2096 if (!musb->ops->dma_init || !musb->ops->dma_exit) {2095 if (!musb->ops->dma_init || !musb->ops->dma_exit) {
2097 dev_err(dev, "DMA controller not set\n");2096 dev_err(dev, "DMA controller not set\n");
2097 status = -ENODEV;
2098 goto fail2;2098 goto fail2;
2099 }2099 }
2100 musb_dma_controller_create = musb->ops->dma_init;2100 musb_dma_controller_create = musb->ops->dma_init;
@@ -2218,6 +2218,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) · 117 unmodified lines
2218 2218
2219 pm_runtime_put(musb->controller);2219 pm_runtime_put(musb->controller);
2220 2220
2221 /*
2222 * For why this is currently needed, see commit 3e43a0725637
2223 * ("usb: musb: core: add pm_runtime_irq_safe()")
2224 */
2225 pm_runtime_irq_safe(musb->controller);
2226
2221 return 0;2227 return 0;
2222 2228
2223fail5:2229fail5:
drivers/usb/phy/phy-msm-usb.c+3−3
@@ -1506,7 +1506,6 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · 1505 unmodified lines
1506{1506{
1507 struct msm_otg_platform_data *pdata;1507 struct msm_otg_platform_data *pdata;
1508 struct extcon_dev *ext_id, *ext_vbus;1508 struct extcon_dev *ext_id, *ext_vbus;
1509 const struct of_device_id *id;
1510 struct device_node *node = pdev->dev.of_node;1509 struct device_node *node = pdev->dev.of_node;
1511 struct property *prop;1510 struct property *prop;
1512 int len, ret, words;1511 int len, ret, words;
@@ -1518,8 +1517,9 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg) · 5 unmodified lines
1518 1517
1519 motg->pdata = pdata;1518 motg->pdata = pdata;
1520 1519
1521 id = of_match_device(msm_otg_dt_match, &pdev->dev);1520 pdata->phy_type = (enum msm_usb_phy_type)of_device_get_match_data(&pdev->dev);
1522 pdata->phy_type = (enum msm_usb_phy_type) id->data;1521 if (!pdata->phy_type)
1522 return 1;
1523 1523
1524 motg->link_rst = devm_reset_control_get(&pdev->dev, "link");1524 motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
1525 if (IS_ERR(motg->link_rst))1525 if (IS_ERR(motg->link_rst))
drivers/usb/phy/phy-mxs-usb.c+5−0
@@ -143,12 +143,17 @@ static const struct mxs_phy_data imx6sx_phy_data = { · 142 unmodified lines
143 .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS,143 .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS,
144};144};
145 145
146static const struct mxs_phy_data imx6ul_phy_data = {
147 .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS,
148};
149
146static const struct of_device_id mxs_phy_dt_ids[] = {150static const struct of_device_id mxs_phy_dt_ids[] = {
147 { .compatible = "fsl,imx6sx-usbphy", .data = &imx6sx_phy_data, },151 { .compatible = "fsl,imx6sx-usbphy", .data = &imx6sx_phy_data, },
148 { .compatible = "fsl,imx6sl-usbphy", .data = &imx6sl_phy_data, },152 { .compatible = "fsl,imx6sl-usbphy", .data = &imx6sl_phy_data, },
149 { .compatible = "fsl,imx6q-usbphy", .data = &imx6q_phy_data, },153 { .compatible = "fsl,imx6q-usbphy", .data = &imx6q_phy_data, },
150 { .compatible = "fsl,imx23-usbphy", .data = &imx23_phy_data, },154 { .compatible = "fsl,imx23-usbphy", .data = &imx23_phy_data, },
151 { .compatible = "fsl,vf610-usbphy", .data = &vf610_phy_data, },155 { .compatible = "fsl,vf610-usbphy", .data = &vf610_phy_data, },
156 { .compatible = "fsl,imx6ul-usbphy", .data = &imx6ul_phy_data, },
152 { /* sentinel */ }157 { /* sentinel */ }
153};158};
154MODULE_DEVICE_TABLE(of, mxs_phy_dt_ids);159MODULE_DEVICE_TABLE(of, mxs_phy_dt_ids);
drivers/usb/renesas_usbhs/mod_gadget.c+9−2
@@ -131,7 +131,8 @@ static void __usbhsg_queue_pop(struct usbhsg_uep *uep, · 130 unmodified lines
131 struct device *dev = usbhsg_gpriv_to_dev(gpriv);131 struct device *dev = usbhsg_gpriv_to_dev(gpriv);
132 struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);132 struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
133 133
134 dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe));134 if (pipe)
135 dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe));
135 136
136 ureq->req.status = status;137 ureq->req.status = status;
137 spin_unlock(usbhs_priv_to_lock(priv));138 spin_unlock(usbhs_priv_to_lock(priv));
@@ -685,7 +686,13 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req) · 547 unmodified lines
685 struct usbhsg_request *ureq = usbhsg_req_to_ureq(req);686 struct usbhsg_request *ureq = usbhsg_req_to_ureq(req);
686 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);687 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
687 688
688 usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq));689 if (pipe)
690 usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq));
691
692 /*
693 * To dequeue a request, this driver should call the usbhsg_queue_pop()
694 * even if the pipe is NULL.
695 */
689 usbhsg_queue_pop(uep, ureq, -ECONNRESET);696 usbhsg_queue_pop(uep, ureq, -ECONNRESET);
690 697
691 return 0;698 return 0;
drivers/usb/serial/cp210x.c+0−1
@@ -132,7 +132,6 @@ static const struct usb_device_id id_table[] = { · 131 unmodified lines
132 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */132 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
133 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */133 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
134 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */134 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
135 { USB_DEVICE(0x10C4, 0xEA80) }, /* Silicon Labs factory default */
136 { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */135 { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
137 { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */136 { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
138 { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */137 { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
drivers/usb/serial/usb-serial-simple.c+1−0
@@ -53,6 +53,7 @@ DEVICE(funsoft, FUNSOFT_IDS); · 52 unmodified lines
53 53
54/* Infineon Flashloader driver */54/* Infineon Flashloader driver */
55#define FLASHLOADER_IDS() \55#define FLASHLOADER_IDS() \
56 { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \
56 { USB_DEVICE(0x8087, 0x0716) }57 { USB_DEVICE(0x8087, 0x0716) }
57DEVICE(flashloader, FLASHLOADER_IDS);58DEVICE(flashloader, FLASHLOADER_IDS);
58 59
drivers/usb/storage/uas.c+4−0
@@ -796,6 +796,10 @@ static int uas_slave_configure(struct scsi_device *sdev) · 795 unmodified lines
796 if (devinfo->flags & US_FL_NO_REPORT_OPCODES)796 if (devinfo->flags & US_FL_NO_REPORT_OPCODES)
797 sdev->no_report_opcodes = 1;797 sdev->no_report_opcodes = 1;
798 798
799 /* A few buggy USB-ATA bridges don't understand FUA */
800 if (devinfo->flags & US_FL_BROKEN_FUA)
801 sdev->broken_fua = 1;
802
799 scsi_change_queue_depth(sdev, devinfo->qdepth - 2);803 scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
800 return 0;804 return 0;
801}805}
drivers/usb/storage/unusual_devs.h+1−1
@@ -1987,7 +1987,7 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x0201, · 1986 unmodified lines
1987 US_FL_IGNORE_RESIDUE ),1987 US_FL_IGNORE_RESIDUE ),
1988 1988
1989/* Reported by Michael Büsch <m@bues.ch> */1989/* Reported by Michael Büsch <m@bues.ch> */
1990UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114,1990UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116,
1991 "JMicron",1991 "JMicron",
1992 "USB to ATA/ATAPI Bridge",1992 "USB to ATA/ATAPI Bridge",
1993 USB_SC_DEVICE, USB_PR_DEVICE, NULL,1993 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
drivers/usb/storage/unusual_uas.h+1−1
@@ -132,7 +132,7 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, · 131 unmodified lines
132 "JMicron",132 "JMicron",
133 "JMS567",133 "JMS567",
134 USB_SC_DEVICE, USB_PR_DEVICE, NULL,134 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
135 US_FL_NO_REPORT_OPCODES),135 US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
136 136
137/* Reported-by: Hans de Goede <hdegoede@redhat.com> */137/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
138UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,138UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
include/linux/usb/quirks.h+3−0
@@ -47,4 +47,7 @@ · 46 unmodified lines
47/* device generates spurious wakeup, ignore remote wakeup capability */47/* device generates spurious wakeup, ignore remote wakeup capability */
48#define USB_QUIRK_IGNORE_REMOTE_WAKEUP BIT(9)48#define USB_QUIRK_IGNORE_REMOTE_WAKEUP BIT(9)
49 49
50/* device can't handle Link Power Management */
51#define USB_QUIRK_NO_LPM BIT(10)
52
50#endif /* __LINUX_USB_QUIRKS_H */53#endif /* __LINUX_USB_QUIRKS_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t