Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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
...

+201 -80
-5
drivers/hid/hid-ids.h
··· 316 316 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 317 317 318 318 #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 320 #define USB_VENDOR_ID_ELECOM 0x056e 326 321 #define USB_DEVICE_ID_ELECOM_BM084 0x0061
+3 -6
drivers/hid/usbhid/hid-quirks.c
··· 72 72 { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL }, 73 73 { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, 74 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 }, 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 }, 75 + { USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL }, 80 76 { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, 81 77 { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS }, 82 78 { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, ··· 336 340 337 341 for (; hid_blacklist[n].idVendor; n++) 338 342 if (hid_blacklist[n].idVendor == idVendor && 339 - hid_blacklist[n].idProduct == idProduct) 343 + (hid_blacklist[n].idProduct == (__u16) HID_ANY_ID || 344 + hid_blacklist[n].idProduct == idProduct)) 340 345 bl_entry = &hid_blacklist[n]; 341 346 342 347 if (bl_entry != NULL)
+5
drivers/usb/class/cdc-acm.c
··· 1838 1838 }, 1839 1839 #endif 1840 1840 1841 + /* Exclude Infineon Flash Loader utility */ 1842 + { USB_DEVICE(0x058b, 0x0041), 1843 + .driver_info = IGNORE_DEVICE, 1844 + }, 1845 + 1841 1846 /* control interfaces without any protocol set */ 1842 1847 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, 1843 1848 USB_CDC_PROTO_NONE) },
+2 -1
drivers/usb/core/config.c
··· 115 115 USB_SS_MULT(desc->bmAttributes) > 3) { 116 116 dev_warn(ddev, "Isoc endpoint has Mult of %d in " 117 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 120 cfgno, inum, asnum, ep->desc.bEndpointAddress); 120 121 ep->ss_ep_comp.bmAttributes = 2; 121 122 }
+14 -8
drivers/usb/core/hub.c
··· 124 124 125 125 int 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 131 /* USB 2.1 (and greater) devices indicate LPM support through 128 132 * their USB 2.0 Extended Capabilities BOS descriptor. 129 133 */ ··· 4516 4512 goto fail; 4517 4513 } 4518 4514 4515 + usb_detect_quirks(udev); 4516 + 4519 4517 if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) { 4520 4518 retval = usb_get_bos_descriptor(udev); 4521 4519 if (!retval) { ··· 4716 4710 if (status < 0) 4717 4711 goto loop; 4718 4712 4719 - usb_detect_quirks(udev); 4720 4713 if (udev->quirks & USB_QUIRK_DELAY_INIT) 4721 4714 msleep(1000); 4722 4715 ··· 5331 5326 if (udev->usb2_hw_lpm_enabled == 1) 5332 5327 usb_set_usb2_hardware_lpm(udev, 0); 5333 5328 5334 - bos = udev->bos; 5335 - udev->bos = NULL; 5336 - 5337 5329 /* Disable LPM and LTM while we reset the device and reinstall the alt 5338 5330 * settings. Device-initiated LPM settings, and system exit latency 5339 5331 * settings are cleared when the device is reset, so we have to set ··· 5339 5337 ret = usb_unlocked_disable_lpm(udev); 5340 5338 if (ret) { 5341 5339 dev_err(&udev->dev, "%s Failed to disable LPM\n.", __func__); 5342 - goto re_enumerate; 5340 + goto re_enumerate_no_bos; 5343 5341 } 5344 5342 ret = usb_disable_ltm(udev); 5345 5343 if (ret) { 5346 5344 dev_err(&udev->dev, "%s Failed to disable LTM\n.", 5347 5345 __func__); 5348 - goto re_enumerate; 5346 + goto re_enumerate_no_bos; 5349 5347 } 5348 + 5349 + bos = udev->bos; 5350 + udev->bos = NULL; 5350 5351 5351 5352 for (i = 0; i < SET_CONFIG_TRIES; ++i) { 5352 5353 ··· 5447 5442 return 0; 5448 5443 5449 5444 re_enumerate: 5450 - /* LPM state doesn't matter when we're about to destroy the device. */ 5451 - hub_port_logical_disconnect(parent_hub, port1); 5452 5445 usb_release_bos_descriptor(udev); 5453 5446 udev->bos = bos; 5447 + re_enumerate_no_bos: 5448 + /* LPM state doesn't matter when we're about to destroy the device. */ 5449 + hub_port_logical_disconnect(parent_hub, port1); 5454 5450 return -ENODEV; 5455 5451 } 5456 5452
+2 -2
drivers/usb/core/port.c
··· 206 206 else 207 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 210 dev_name(&left->dev), dev_name(&right->dev), method, 211 211 dev_name(&left->dev), 212 212 lpeer ? dev_name(&lpeer->dev) : "none", ··· 265 265 if (rc == 0) { 266 266 dev_dbg(&left->dev, "peered to %s\n", dev_name(&right->dev)); 267 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 269 dev_name(&right->dev), rc); 270 270 pr_warn_once("usb: port power management may be unreliable\n"); 271 271 usb_port_block_power_off = 1;
+9
drivers/usb/core/quirks.c
··· 125 125 { USB_DEVICE(0x04f3, 0x016f), .driver_info = 126 126 USB_QUIRK_DEVICE_QUALIFIER }, 127 127 128 + { USB_DEVICE(0x04f3, 0x21b8), .driver_info = 129 + USB_QUIRK_DEVICE_QUALIFIER }, 130 + 128 131 /* Roland SC-8820 */ 129 132 { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, 130 133 ··· 201 198 /* Protocol and OTG Electrical Test Device */ 202 199 { USB_DEVICE(0x1a0a, 0x0200), .driver_info = 203 200 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, 201 + 202 + /* Blackmagic Design Intensity Shuttle */ 203 + { USB_DEVICE(0x1edb, 0xbd3b), .driver_info = USB_QUIRK_NO_LPM }, 204 + 205 + /* Blackmagic Design UltraStudio SDI */ 206 + { USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM }, 204 207 205 208 { } /* terminating entry must be last */ 206 209 };
+54 -29
drivers/usb/dwc2/platform.c
··· 125 125 if (ret) 126 126 return ret; 127 127 128 - ret = clk_prepare_enable(hsotg->clk); 129 - if (ret) 130 - return ret; 128 + if (hsotg->clk) { 129 + ret = clk_prepare_enable(hsotg->clk); 130 + if (ret) 131 + return ret; 132 + } 131 133 132 134 if (hsotg->uphy) 133 135 ret = usb_phy_init(hsotg->uphy); ··· 177 175 if (ret) 178 176 return ret; 179 177 180 - clk_disable_unprepare(hsotg->clk); 178 + if (hsotg->clk) 179 + clk_disable_unprepare(hsotg->clk); 181 180 182 181 ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies), 183 182 hsotg->supplies); ··· 215 212 */ 216 213 hsotg->phy = devm_phy_get(hsotg->dev, "usb2-phy"); 217 214 if (IS_ERR(hsotg->phy)) { 218 - hsotg->phy = NULL; 219 - hsotg->uphy = devm_usb_get_phy(hsotg->dev, USB_PHY_TYPE_USB2); 220 - if (IS_ERR(hsotg->uphy)) 221 - hsotg->uphy = NULL; 222 - else 223 - hsotg->plat = dev_get_platdata(hsotg->dev); 215 + ret = PTR_ERR(hsotg->phy); 216 + switch (ret) { 217 + case -ENODEV: 218 + case -ENOSYS: 219 + hsotg->phy = NULL; 220 + break; 221 + case -EPROBE_DEFER: 222 + return ret; 223 + default: 224 + dev_err(hsotg->dev, "error getting phy %d\n", ret); 225 + return ret; 226 + } 224 227 } 228 + 229 + if (!hsotg->phy) { 230 + hsotg->uphy = devm_usb_get_phy(hsotg->dev, USB_PHY_TYPE_USB2); 231 + if (IS_ERR(hsotg->uphy)) { 232 + ret = PTR_ERR(hsotg->uphy); 233 + switch (ret) { 234 + case -ENODEV: 235 + case -ENXIO: 236 + hsotg->uphy = NULL; 237 + break; 238 + case -EPROBE_DEFER: 239 + return ret; 240 + default: 241 + dev_err(hsotg->dev, "error getting usb phy %d\n", 242 + ret); 243 + return ret; 244 + } 245 + } 246 + } 247 + 248 + hsotg->plat = dev_get_platdata(hsotg->dev); 225 249 226 250 if (hsotg->phy) { 227 251 /* ··· 257 227 */ 258 228 if (phy_get_bus_width(hsotg->phy) == 8) 259 229 hsotg->phyif = GUSBCFG_PHYIF8; 260 - } 261 - 262 - if (!hsotg->phy && !hsotg->uphy && !hsotg->plat) { 263 - dev_err(hsotg->dev, "no platform data or transceiver defined\n"); 264 - return -EPROBE_DEFER; 265 230 } 266 231 267 232 /* Clock */ ··· 367 342 if (retval) 368 343 return retval; 369 344 370 - irq = platform_get_irq(dev, 0); 371 - if (irq < 0) { 372 - dev_err(&dev->dev, "missing IRQ resource\n"); 373 - return irq; 374 - } 375 - 376 - dev_dbg(hsotg->dev, "registering common handler for irq%d\n", 377 - irq); 378 - retval = devm_request_irq(hsotg->dev, irq, 379 - dwc2_handle_common_intr, IRQF_SHARED, 380 - dev_name(hsotg->dev), hsotg); 381 - if (retval) 382 - return retval; 383 - 384 345 res = platform_get_resource(dev, IORESOURCE_MEM, 0); 385 346 hsotg->regs = devm_ioremap_resource(&dev->dev, res); 386 347 if (IS_ERR(hsotg->regs)) ··· 400 389 return -ENOMEM; 401 390 402 391 dwc2_set_all_params(hsotg->core_params, -1); 392 + 393 + irq = platform_get_irq(dev, 0); 394 + if (irq < 0) { 395 + dev_err(&dev->dev, "missing IRQ resource\n"); 396 + return irq; 397 + } 398 + 399 + dev_dbg(hsotg->dev, "registering common handler for irq%d\n", 400 + irq); 401 + retval = devm_request_irq(hsotg->dev, irq, 402 + dwc2_handle_common_intr, IRQF_SHARED, 403 + dev_name(hsotg->dev), hsotg); 404 + if (retval) 405 + return retval; 403 406 404 407 retval = dwc2_lowlevel_hw_enable(hsotg); 405 408 if (retval)
+1
drivers/usb/dwc3/gadget.c
··· 1078 1078 * little bit faster. 1079 1079 */ 1080 1080 if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) && 1081 + !usb_endpoint_xfer_int(dep->endpoint.desc) && 1081 1082 !(dep->flags & DWC3_EP_BUSY)) { 1082 1083 ret = __dwc3_gadget_kick_transfer(dep, 0, true); 1083 1084 goto out;
+3 -3
drivers/usb/gadget/function/f_fs.c
··· 423 423 spin_unlock_irq(&ffs->ev.waitq.lock); 424 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 429 429 static ssize_t ffs_ep0_read(struct file *file, char __user *buf, ··· 513 513 514 514 /* unlocks spinlock */ 515 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 517 ret = -EFAULT; 518 518 goto done_mutex; 519 519 ··· 3493 3493 if (unlikely(!data)) 3494 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 3497 kfree(data); 3498 3498 return ERR_PTR(-EFAULT); 3499 3499 }
+2 -1
drivers/usb/gadget/function/f_midi.c
··· 370 370 if (err) { 371 371 ERROR(midi, "%s queue req: %d\n", 372 372 midi->out_ep->name, err); 373 + free_ep_req(midi->out_ep, req); 373 374 } 374 375 } 375 376 ··· 546 545 } 547 546 } 548 547 549 - if (req->length > 0) { 548 + if (req->length > 0 && ep->enabled) { 550 549 int err; 551 550 552 551 err = usb_ep_queue(ep, req, GFP_ATOMIC);
+1 -1
drivers/usb/gadget/function/uvc_configfs.c
··· 20 20 #define UVC_ATTR(prefix, cname, aname) \ 21 21 static struct configfs_attribute prefix##attr_##cname = { \ 22 22 .ca_name = __stringify(aname), \ 23 - .ca_mode = S_IRUGO, \ 23 + .ca_mode = S_IRUGO | S_IWUGO, \ 24 24 .ca_owner = THIS_MODULE, \ 25 25 .show = prefix##cname##_show, \ 26 26 .store = prefix##cname##_store, \
+3
drivers/usb/gadget/udc/pxa27x_udc.c
··· 2536 2536 udc->pullup_resume = udc->pullup_on; 2537 2537 dplus_pullup(udc, 0); 2538 2538 2539 + if (udc->driver) 2540 + udc->driver->disconnect(&udc->gadget); 2541 + 2539 2542 return 0; 2540 2543 } 2541 2544
+5 -6
drivers/usb/host/ohci-at91.c
··· 473 473 if (!pdata) 474 474 return -ENOMEM; 475 475 476 + pdev->dev.platform_data = pdata; 477 + 476 478 if (!of_property_read_u32(np, "num-ports", &ports)) 477 479 pdata->ports = ports; 478 480 ··· 485 483 */ 486 484 if (i >= pdata->ports) { 487 485 pdata->vbus_pin[i] = -EINVAL; 486 + pdata->overcurrent_pin[i] = -EINVAL; 488 487 continue; 489 488 } 490 489 ··· 516 513 } 517 514 518 515 at91_for_each_port(i) { 519 - if (i >= pdata->ports) { 520 - pdata->overcurrent_pin[i] = -EINVAL; 521 - continue; 522 - } 516 + if (i >= pdata->ports) 517 + break; 523 518 524 519 pdata->overcurrent_pin[i] = 525 520 of_get_named_gpio_flags(np, "atmel,oc-gpio", i, &flags); ··· 552 551 "can't get gpio IRQ for overcurrent\n"); 553 552 } 554 553 } 555 - 556 - pdev->dev.platform_data = pdata; 557 554 558 555 device_init_wakeup(&pdev->dev, 1); 559 556 return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
+4
drivers/usb/host/whci/qset.c
··· 377 377 if (std->pl_virt == NULL) 378 378 return -ENOMEM; 379 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 385 for (p = 0; p < std->num_pointers; p++) { 382 386 std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);
+42 -5
drivers/usb/host/xhci-hub.c
··· 733 733 if ((raw_port_status & PORT_RESET) || 734 734 !(raw_port_status & PORT_PE)) 735 735 return 0xffffffff; 736 - if (time_after_eq(jiffies, 737 - bus_state->resume_done[wIndex])) { 736 + /* did port event handler already start resume timing? */ 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 760 int time_left; 739 761 740 762 xhci_dbg(xhci, "Resume USB2 port %d\n", ··· 797 775 } else { 798 776 /* 799 777 * The resume has been signaling for less than 800 - * 20ms. Report the port status as SUSPEND, 801 - * let the usbcore check port status again 802 - * and clear resume signaling later. 778 + * USB_RESUME_TIME. Report the port status as SUSPEND, 779 + * let the usbcore check port status again and clear 780 + * resume signaling later. 803 781 */ 804 782 status |= USB_PORT_STAT_SUSPEND; 805 783 } 806 784 } 785 + /* 786 + * Clear stale usb2 resume signalling variables in case port changed 787 + * state during resume signalling. For example on error 788 + */ 789 + if ((bus_state->resume_done[wIndex] || 790 + test_bit(wIndex, &bus_state->resuming_ports)) && 791 + (raw_port_status & PORT_PLS_MASK) != XDEV_U3 && 792 + (raw_port_status & PORT_PLS_MASK) != XDEV_RESUME) { 793 + bus_state->resume_done[wIndex] = 0; 794 + clear_bit(wIndex, &bus_state->resuming_ports); 795 + } 796 + 797 + 807 798 if ((raw_port_status & PORT_PLS_MASK) == XDEV_U0 && 808 799 (raw_port_status & PORT_POWER)) { 809 800 if (bus_state->suspended_ports & (1 << wIndex)) { ··· 1150 1115 if ((temp & PORT_PE) == 0) 1151 1116 goto error; 1152 1117 1118 + set_bit(wIndex, &bus_state->resuming_ports); 1153 1119 xhci_set_link_state(xhci, port_array, wIndex, 1154 1120 XDEV_RESUME); 1155 1121 spin_unlock_irqrestore(&xhci->lock, flags); ··· 1158 1122 spin_lock_irqsave(&xhci->lock, flags); 1159 1123 xhci_set_link_state(xhci, port_array, wIndex, 1160 1124 XDEV_U0); 1125 + clear_bit(wIndex, &bus_state->resuming_ports); 1161 1126 } 1162 1127 bus_state->port_c_suspend |= 1 << wIndex; 1163 1128
+6 -2
drivers/usb/host/xhci-pci.c
··· 188 188 0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45, 189 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 197 #else 194 - static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } 198 + static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } 195 199 #endif /* CONFIG_ACPI */ 196 200 197 201 /* called during probe() after chip reset completes */
+2 -1
drivers/usb/host/xhci-ring.c
··· 1583 1583 */ 1584 1584 bogus_port_status = true; 1585 1585 goto cleanup; 1586 - } else { 1586 + } else if (!test_bit(faked_port_index, 1587 + &bus_state->resuming_ports)) { 1587 1588 xhci_dbg(xhci, "resume HS port %d\n", port_id); 1588 1589 bus_state->resume_done[faked_port_index] = jiffies + 1589 1590 msecs_to_jiffies(USB_RESUME_TIMEOUT);
+8
drivers/usb/host/xhci.c
··· 4778 4778 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); 4779 4779 slot_ctx = xhci_get_slot_ctx(xhci, config_cmd->in_ctx); 4780 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 4786 if (tt->multi) 4782 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 4791 if (xhci->hci_version > 0x95) { 4784 4792 xhci_dbg(xhci, "xHCI version %x needs hub " 4785 4793 "TT think time and number of ports\n",
+1 -1
drivers/usb/musb/Kconfig
··· 159 159 160 160 config USB_TI_CPPI41_DMA 161 161 bool 'TI CPPI 4.1 (AM335x)' 162 - depends on ARCH_OMAP 162 + depends on ARCH_OMAP && DMADEVICES 163 163 select TI_CPPI41 164 164 165 165 config USB_TUSB_OMAP_DMA
+7 -1
drivers/usb/musb/musb_core.c
··· 2017 2017 /* We need musb_read/write functions initialized for PM */ 2018 2018 pm_runtime_use_autosuspend(musb->controller); 2019 2019 pm_runtime_set_autosuspend_delay(musb->controller, 200); 2020 - pm_runtime_irq_safe(musb->controller); 2021 2020 pm_runtime_enable(musb->controller); 2022 2021 2023 2022 /* The musb_platform_init() call: ··· 2094 2095 #ifndef CONFIG_MUSB_PIO_ONLY 2095 2096 if (!musb->ops->dma_init || !musb->ops->dma_exit) { 2096 2097 dev_err(dev, "DMA controller not set\n"); 2098 + status = -ENODEV; 2097 2099 goto fail2; 2098 2100 } 2099 2101 musb_dma_controller_create = musb->ops->dma_init; ··· 2217 2217 goto fail5; 2218 2218 2219 2219 pm_runtime_put(musb->controller); 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); 2220 2226 2221 2227 return 0; 2222 2228
+3 -3
drivers/usb/phy/phy-msm-usb.c
··· 1506 1506 { 1507 1507 struct msm_otg_platform_data *pdata; 1508 1508 struct extcon_dev *ext_id, *ext_vbus; 1509 - const struct of_device_id *id; 1510 1509 struct device_node *node = pdev->dev.of_node; 1511 1510 struct property *prop; 1512 1511 int len, ret, words; ··· 1517 1518 1518 1519 motg->pdata = pdata; 1519 1520 1520 - id = of_match_device(msm_otg_dt_match, &pdev->dev); 1521 - pdata->phy_type = (enum msm_usb_phy_type) id->data; 1521 + pdata->phy_type = (enum msm_usb_phy_type)of_device_get_match_data(&pdev->dev); 1522 + if (!pdata->phy_type) 1523 + return 1; 1522 1524 1523 1525 motg->link_rst = devm_reset_control_get(&pdev->dev, "link"); 1524 1526 if (IS_ERR(motg->link_rst))
+5
drivers/usb/phy/phy-mxs-usb.c
··· 143 143 .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS, 144 144 }; 145 145 146 + static const struct mxs_phy_data imx6ul_phy_data = { 147 + .flags = MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS, 148 + }; 149 + 146 150 static const struct of_device_id mxs_phy_dt_ids[] = { 147 151 { .compatible = "fsl,imx6sx-usbphy", .data = &imx6sx_phy_data, }, 148 152 { .compatible = "fsl,imx6sl-usbphy", .data = &imx6sl_phy_data, }, 149 153 { .compatible = "fsl,imx6q-usbphy", .data = &imx6q_phy_data, }, 150 154 { .compatible = "fsl,imx23-usbphy", .data = &imx23_phy_data, }, 151 155 { .compatible = "fsl,vf610-usbphy", .data = &vf610_phy_data, }, 156 + { .compatible = "fsl,imx6ul-usbphy", .data = &imx6ul_phy_data, }, 152 157 { /* sentinel */ } 153 158 }; 154 159 MODULE_DEVICE_TABLE(of, mxs_phy_dt_ids);
+9 -2
drivers/usb/renesas_usbhs/mod_gadget.c
··· 131 131 struct device *dev = usbhsg_gpriv_to_dev(gpriv); 132 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 137 ureq->req.status = status; 137 138 spin_unlock(usbhs_priv_to_lock(priv)); ··· 686 685 struct usbhsg_request *ureq = usbhsg_req_to_ureq(req); 687 686 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); 688 687 689 - usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); 688 + if (pipe) 689 + usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); 690 + 691 + /* 692 + * To dequeue a request, this driver should call the usbhsg_queue_pop() 693 + * even if the pipe is NULL. 694 + */ 690 695 usbhsg_queue_pop(uep, ureq, -ECONNRESET); 691 696 692 697 return 0;
-1
drivers/usb/serial/cp210x.c
··· 132 132 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ 133 133 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ 134 134 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ 135 - { USB_DEVICE(0x10C4, 0xEA80) }, /* Silicon Labs factory default */ 136 135 { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ 137 136 { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ 138 137 { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
+1
drivers/usb/serial/usb-serial-simple.c
··· 53 53 54 54 /* Infineon Flashloader driver */ 55 55 #define FLASHLOADER_IDS() \ 56 + { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \ 56 57 { USB_DEVICE(0x8087, 0x0716) } 57 58 DEVICE(flashloader, FLASHLOADER_IDS); 58 59
+4
drivers/usb/storage/uas.c
··· 796 796 if (devinfo->flags & US_FL_NO_REPORT_OPCODES) 797 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 803 scsi_change_queue_depth(sdev, devinfo->qdepth - 2); 800 804 return 0; 801 805 }
+1 -1
drivers/usb/storage/unusual_devs.h
··· 1987 1987 US_FL_IGNORE_RESIDUE ), 1988 1988 1989 1989 /* Reported by Michael Büsch <m@bues.ch> */ 1990 - UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114, 1990 + UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, 1991 1991 "JMicron", 1992 1992 "USB to ATA/ATAPI Bridge", 1993 1993 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+1 -1
drivers/usb/storage/unusual_uas.h
··· 132 132 "JMicron", 133 133 "JMS567", 134 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 137 /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ 138 138 UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
+3
include/linux/usb/quirks.h
··· 47 47 /* device generates spurious wakeup, ignore remote wakeup capability */ 48 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 53 #endif /* __LINUX_USB_QUIRKS_H */