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.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are a number of USB fixes for 4.16-rc3

Nothing major, but a number of different fixes all over the place in
the USB stack for reported issues. Mostly gadget driver fixes,
although the typical set of xhci bugfixes are there, along with some
new quirks additions as well.

All of these have been in linux-next for a while with no reported
issues"

* tag 'usb-4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (39 commits)
Revert "usb: musb: host: don't start next rx urb if current one failed"
usb: musb: fix enumeration after resume
usb: cdc_acm: prevent race at write to acm while system resumes
Add delay-init quirk for Corsair K70 RGB keyboards
usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()
usb: host: ehci: always enable interrupt for qtd completion at test mode
usb: ldusb: add PIDs for new CASSY devices supported by this driver
usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path
usb: host: ehci: use correct device pointer for dma ops
usbip: keep usbip_device sockfd state in sync with tcp_socket
ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func()
USB: serial: option: Add support for Quectel EP06
xhci: fix xhci debugfs errors in xhci_stop
xhci: xhci debugfs device nodes weren't removed after device plugged out
xhci: Fix xhci debugfs devices node disappearance after hibernation
xhci: Fix NULL pointer in xhci debugfs
xhci: Don't print a warning when setting link state for disabled ports
xhci: workaround for AMD Promontory disabled ports wakeup
usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
...

+352 -135
+3
drivers/hid/hid-ids.h
··· 645 645 #define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 646 646 #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 647 647 #define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 648 + #define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040 649 + #define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042 650 + #define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043 648 651 #define USB_DEVICE_ID_LD_JWM 0x1080 649 652 #define USB_DEVICE_ID_LD_DMMP 0x1081 650 653 #define USB_DEVICE_ID_LD_UMIP 0x1090
+3
drivers/hid/hid-quirks.c
··· 809 809 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) }, 810 810 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) }, 811 811 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) }, 812 + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) }, 813 + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) }, 814 + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) }, 812 815 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) }, 813 816 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) }, 814 817 { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
+6 -3
drivers/usb/class/cdc-acm.c
··· 174 174 wb = &acm->wb[wbn]; 175 175 if (!wb->use) { 176 176 wb->use = 1; 177 + wb->len = 0; 177 178 return wbn; 178 179 } 179 180 wbn = (wbn + 1) % ACM_NW; ··· 806 805 static void acm_tty_flush_chars(struct tty_struct *tty) 807 806 { 808 807 struct acm *acm = tty->driver_data; 809 - struct acm_wb *cur = acm->putbuffer; 808 + struct acm_wb *cur; 810 809 int err; 811 810 unsigned long flags; 812 811 812 + spin_lock_irqsave(&acm->write_lock, flags); 813 + 814 + cur = acm->putbuffer; 813 815 if (!cur) /* nothing to do */ 814 - return; 816 + goto out; 815 817 816 818 acm->putbuffer = NULL; 817 819 err = usb_autopm_get_interface_async(acm->control); 818 - spin_lock_irqsave(&acm->write_lock, flags); 819 820 if (err < 0) { 820 821 cur->use = 0; 821 822 acm->putbuffer = cur;
+3
drivers/usb/core/quirks.c
··· 226 226 { USB_DEVICE(0x1a0a, 0x0200), .driver_info = 227 227 USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, 228 228 229 + /* Corsair K70 RGB */ 230 + { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT }, 231 + 229 232 /* Corsair Strafe RGB */ 230 233 { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT }, 231 234
+16 -10
drivers/usb/dwc2/gadget.c
··· 1917 1917 /* Not specific buffer needed for ep0 ZLP */ 1918 1918 dma_addr_t dma = hs_ep->desc_list_dma; 1919 1919 1920 - dwc2_gadget_set_ep0_desc_chain(hsotg, hs_ep); 1920 + if (!index) 1921 + dwc2_gadget_set_ep0_desc_chain(hsotg, hs_ep); 1922 + 1921 1923 dwc2_gadget_config_nonisoc_xfer_ddma(hs_ep, dma, 0); 1922 1924 } else { 1923 1925 dwc2_writel(DXEPTSIZ_MC(1) | DXEPTSIZ_PKTCNT(1) | ··· 2976 2974 if (ints & DXEPINT_STSPHSERCVD) { 2977 2975 dev_dbg(hsotg->dev, "%s: StsPhseRcvd\n", __func__); 2978 2976 2979 - /* Move to STATUS IN for DDMA */ 2980 - if (using_desc_dma(hsotg)) 2981 - dwc2_hsotg_ep0_zlp(hsotg, true); 2977 + /* Safety check EP0 state when STSPHSERCVD asserted */ 2978 + if (hsotg->ep0_state == DWC2_EP0_DATA_OUT) { 2979 + /* Move to STATUS IN for DDMA */ 2980 + if (using_desc_dma(hsotg)) 2981 + dwc2_hsotg_ep0_zlp(hsotg, true); 2982 + } 2983 + 2982 2984 } 2983 2985 2984 2986 if (ints & DXEPINT_BACK2BACKSETUP) ··· 3381 3375 dwc2_writel(dwc2_hsotg_ep0_mps(hsotg->eps_out[0]->ep.maxpacket) | 3382 3376 DXEPCTL_USBACTEP, hsotg->regs + DIEPCTL0); 3383 3377 3384 - dwc2_hsotg_enqueue_setup(hsotg); 3385 - 3386 - dev_dbg(hsotg->dev, "EP0: DIEPCTL0=0x%08x, DOEPCTL0=0x%08x\n", 3387 - dwc2_readl(hsotg->regs + DIEPCTL0), 3388 - dwc2_readl(hsotg->regs + DOEPCTL0)); 3389 - 3390 3378 /* clear global NAKs */ 3391 3379 val = DCTL_CGOUTNAK | DCTL_CGNPINNAK; 3392 3380 if (!is_usb_reset) ··· 3391 3391 mdelay(3); 3392 3392 3393 3393 hsotg->lx_state = DWC2_L0; 3394 + 3395 + dwc2_hsotg_enqueue_setup(hsotg); 3396 + 3397 + dev_dbg(hsotg->dev, "EP0: DIEPCTL0=0x%08x, DOEPCTL0=0x%08x\n", 3398 + dwc2_readl(hsotg->regs + DIEPCTL0), 3399 + dwc2_readl(hsotg->regs + DOEPCTL0)); 3394 3400 } 3395 3401 3396 3402 static void dwc2_hsotg_core_disconnect(struct dwc2_hsotg *hsotg)
+63 -27
drivers/usb/dwc3/core.c
··· 100 100 reg &= ~(DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_OTG)); 101 101 reg |= DWC3_GCTL_PRTCAPDIR(mode); 102 102 dwc3_writel(dwc->regs, DWC3_GCTL, reg); 103 + 104 + dwc->current_dr_role = mode; 103 105 } 104 106 105 107 static void __dwc3_set_mode(struct work_struct *work) ··· 134 132 spin_lock_irqsave(&dwc->lock, flags); 135 133 136 134 dwc3_set_prtcap(dwc, dwc->desired_dr_role); 137 - 138 - dwc->current_dr_role = dwc->desired_dr_role; 139 135 140 136 spin_unlock_irqrestore(&dwc->lock, flags); 141 137 ··· 219 219 * XHCI driver will reset the host block. If dwc3 was configured for 220 220 * host-only mode, then we can return early. 221 221 */ 222 - if (dwc->dr_mode == USB_DR_MODE_HOST) 222 + if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST) 223 223 return 0; 224 224 225 225 reg = dwc3_readl(dwc->regs, DWC3_DCTL); ··· 233 233 234 234 udelay(1); 235 235 } while (--retries); 236 + 237 + phy_exit(dwc->usb3_generic_phy); 238 + phy_exit(dwc->usb2_generic_phy); 236 239 237 240 return -ETIMEDOUT; 238 241 } ··· 486 483 parms->hwparams8 = dwc3_readl(dwc->regs, DWC3_GHWPARAMS8); 487 484 } 488 485 486 + static int dwc3_core_ulpi_init(struct dwc3 *dwc) 487 + { 488 + int intf; 489 + int ret = 0; 490 + 491 + intf = DWC3_GHWPARAMS3_HSPHY_IFC(dwc->hwparams.hwparams3); 492 + 493 + if (intf == DWC3_GHWPARAMS3_HSPHY_IFC_ULPI || 494 + (intf == DWC3_GHWPARAMS3_HSPHY_IFC_UTMI_ULPI && 495 + dwc->hsphy_interface && 496 + !strncmp(dwc->hsphy_interface, "ulpi", 4))) 497 + ret = dwc3_ulpi_init(dwc); 498 + 499 + return ret; 500 + } 501 + 489 502 /** 490 503 * dwc3_phy_setup - Configure USB PHY Interface of DWC3 Core 491 504 * @dwc: Pointer to our controller context structure ··· 513 494 static int dwc3_phy_setup(struct dwc3 *dwc) 514 495 { 515 496 u32 reg; 516 - int ret; 517 497 518 498 reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); 519 499 ··· 583 565 } 584 566 /* FALLTHROUGH */ 585 567 case DWC3_GHWPARAMS3_HSPHY_IFC_ULPI: 586 - ret = dwc3_ulpi_init(dwc); 587 - if (ret) 588 - return ret; 589 568 /* FALLTHROUGH */ 590 569 default: 591 570 break; ··· 739 724 } 740 725 741 726 static int dwc3_core_get_phy(struct dwc3 *dwc); 727 + static int dwc3_core_ulpi_init(struct dwc3 *dwc); 742 728 743 729 /** 744 730 * dwc3_core_init - Low-level initialization of DWC3 Core ··· 771 755 dwc->maximum_speed = USB_SPEED_HIGH; 772 756 } 773 757 774 - ret = dwc3_core_get_phy(dwc); 775 - if (ret) 776 - goto err0; 777 - 778 - ret = dwc3_core_soft_reset(dwc); 779 - if (ret) 780 - goto err0; 781 - 782 758 ret = dwc3_phy_setup(dwc); 783 759 if (ret) 784 760 goto err0; 761 + 762 + if (!dwc->ulpi_ready) { 763 + ret = dwc3_core_ulpi_init(dwc); 764 + if (ret) 765 + goto err0; 766 + dwc->ulpi_ready = true; 767 + } 768 + 769 + if (!dwc->phys_ready) { 770 + ret = dwc3_core_get_phy(dwc); 771 + if (ret) 772 + goto err0a; 773 + dwc->phys_ready = true; 774 + } 775 + 776 + ret = dwc3_core_soft_reset(dwc); 777 + if (ret) 778 + goto err0a; 785 779 786 780 dwc3_core_setup_global_control(dwc); 787 781 dwc3_core_num_eps(dwc); ··· 863 837 usb_phy_shutdown(dwc->usb3_phy); 864 838 phy_exit(dwc->usb2_generic_phy); 865 839 phy_exit(dwc->usb3_generic_phy); 840 + 841 + err0a: 842 + dwc3_ulpi_exit(dwc); 866 843 867 844 err0: 868 845 return ret; ··· 945 916 946 917 switch (dwc->dr_mode) { 947 918 case USB_DR_MODE_PERIPHERAL: 948 - dwc->current_dr_role = DWC3_GCTL_PRTCAP_DEVICE; 949 919 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE); 950 920 951 921 if (dwc->usb2_phy) ··· 960 932 } 961 933 break; 962 934 case USB_DR_MODE_HOST: 963 - dwc->current_dr_role = DWC3_GCTL_PRTCAP_HOST; 964 935 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_HOST); 965 936 966 937 if (dwc->usb2_phy) ··· 1261 1234 1262 1235 err3: 1263 1236 dwc3_free_event_buffers(dwc); 1264 - dwc3_ulpi_exit(dwc); 1265 1237 1266 1238 err2: 1267 1239 pm_runtime_allow(&pdev->dev); ··· 1310 1284 } 1311 1285 1312 1286 #ifdef CONFIG_PM 1313 - static int dwc3_suspend_common(struct dwc3 *dwc) 1287 + static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) 1314 1288 { 1315 1289 unsigned long flags; 1316 1290 ··· 1322 1296 dwc3_core_exit(dwc); 1323 1297 break; 1324 1298 case DWC3_GCTL_PRTCAP_HOST: 1299 + /* do nothing during host runtime_suspend */ 1300 + if (!PMSG_IS_AUTO(msg)) 1301 + dwc3_core_exit(dwc); 1302 + break; 1325 1303 default: 1326 1304 /* do nothing */ 1327 1305 break; ··· 1334 1304 return 0; 1335 1305 } 1336 1306 1337 - static int dwc3_resume_common(struct dwc3 *dwc) 1307 + static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg) 1338 1308 { 1339 1309 unsigned long flags; 1340 1310 int ret; ··· 1350 1320 spin_unlock_irqrestore(&dwc->lock, flags); 1351 1321 break; 1352 1322 case DWC3_GCTL_PRTCAP_HOST: 1323 + /* nothing to do on host runtime_resume */ 1324 + if (!PMSG_IS_AUTO(msg)) { 1325 + ret = dwc3_core_init(dwc); 1326 + if (ret) 1327 + return ret; 1328 + } 1329 + break; 1353 1330 default: 1354 1331 /* do nothing */ 1355 1332 break; ··· 1368 1331 static int dwc3_runtime_checks(struct dwc3 *dwc) 1369 1332 { 1370 1333 switch (dwc->current_dr_role) { 1371 - case USB_DR_MODE_PERIPHERAL: 1372 - case USB_DR_MODE_OTG: 1334 + case DWC3_GCTL_PRTCAP_DEVICE: 1373 1335 if (dwc->connected) 1374 1336 return -EBUSY; 1375 1337 break; 1376 - case USB_DR_MODE_HOST: 1338 + case DWC3_GCTL_PRTCAP_HOST: 1377 1339 default: 1378 1340 /* do nothing */ 1379 1341 break; ··· 1389 1353 if (dwc3_runtime_checks(dwc)) 1390 1354 return -EBUSY; 1391 1355 1392 - ret = dwc3_suspend_common(dwc); 1356 + ret = dwc3_suspend_common(dwc, PMSG_AUTO_SUSPEND); 1393 1357 if (ret) 1394 1358 return ret; 1395 1359 ··· 1405 1369 1406 1370 device_init_wakeup(dev, false); 1407 1371 1408 - ret = dwc3_resume_common(dwc); 1372 + ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME); 1409 1373 if (ret) 1410 1374 return ret; 1411 1375 ··· 1452 1416 struct dwc3 *dwc = dev_get_drvdata(dev); 1453 1417 int ret; 1454 1418 1455 - ret = dwc3_suspend_common(dwc); 1419 + ret = dwc3_suspend_common(dwc, PMSG_SUSPEND); 1456 1420 if (ret) 1457 1421 return ret; 1458 1422 ··· 1468 1432 1469 1433 pinctrl_pm_select_default_state(dev); 1470 1434 1471 - ret = dwc3_resume_common(dwc); 1435 + ret = dwc3_resume_common(dwc, PMSG_RESUME); 1472 1436 if (ret) 1473 1437 return ret; 1474 1438
+14 -7
drivers/usb/dwc3/core.h
··· 158 158 #define DWC3_GDBGFIFOSPACE_TYPE(n) (((n) << 5) & 0x1e0) 159 159 #define DWC3_GDBGFIFOSPACE_SPACE_AVAILABLE(n) (((n) >> 16) & 0xffff) 160 160 161 - #define DWC3_TXFIFOQ 1 162 - #define DWC3_RXFIFOQ 3 163 - #define DWC3_TXREQQ 5 164 - #define DWC3_RXREQQ 7 165 - #define DWC3_RXINFOQ 9 166 - #define DWC3_DESCFETCHQ 13 167 - #define DWC3_EVENTQ 15 161 + #define DWC3_TXFIFOQ 0 162 + #define DWC3_RXFIFOQ 1 163 + #define DWC3_TXREQQ 2 164 + #define DWC3_RXREQQ 3 165 + #define DWC3_RXINFOQ 4 166 + #define DWC3_PSTATQ 5 167 + #define DWC3_DESCFETCHQ 6 168 + #define DWC3_EVENTQ 7 169 + #define DWC3_AUXEVENTQ 8 168 170 169 171 /* Global RX Threshold Configuration Register */ 170 172 #define DWC3_GRXTHRCFG_MAXRXBURSTSIZE(n) (((n) & 0x1f) << 19) ··· 797 795 * @usb3_phy: pointer to USB3 PHY 798 796 * @usb2_generic_phy: pointer to USB2 PHY 799 797 * @usb3_generic_phy: pointer to USB3 PHY 798 + * @phys_ready: flag to indicate that PHYs are ready 800 799 * @ulpi: pointer to ulpi interface 800 + * @ulpi_ready: flag to indicate that ULPI is initialized 801 801 * @u2sel: parameter from Set SEL request. 802 802 * @u2pel: parameter from Set SEL request. 803 803 * @u1sel: parameter from Set SEL request. ··· 897 893 struct phy *usb2_generic_phy; 898 894 struct phy *usb3_generic_phy; 899 895 896 + bool phys_ready; 897 + 900 898 struct ulpi *ulpi; 899 + bool ulpi_ready; 901 900 902 901 void __iomem *regs; 903 902 size_t regs_size;
+1
drivers/usb/dwc3/dwc3-of-simple.c
··· 143 143 clk_disable_unprepare(simple->clks[i]); 144 144 clk_put(simple->clks[i]); 145 145 } 146 + simple->num_clocks = 0; 146 147 147 148 reset_control_assert(simple->resets); 148 149 reset_control_put(simple->resets);
+16
drivers/usb/dwc3/dwc3-omap.c
··· 582 582 return 0; 583 583 } 584 584 585 + static void dwc3_omap_complete(struct device *dev) 586 + { 587 + struct dwc3_omap *omap = dev_get_drvdata(dev); 588 + 589 + if (extcon_get_state(omap->edev, EXTCON_USB)) 590 + dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID); 591 + else 592 + dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_OFF); 593 + 594 + if (extcon_get_state(omap->edev, EXTCON_USB_HOST)) 595 + dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND); 596 + else 597 + dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_FLOAT); 598 + } 599 + 585 600 static const struct dev_pm_ops dwc3_omap_dev_pm_ops = { 586 601 587 602 SET_SYSTEM_SLEEP_PM_OPS(dwc3_omap_suspend, dwc3_omap_resume) 603 + .complete = dwc3_omap_complete, 588 604 }; 589 605 590 606 #define DEV_PM_OPS (&dwc3_omap_dev_pm_ops)
+6 -1
drivers/usb/dwc3/ep0.c
··· 854 854 trb++; 855 855 trb->ctrl &= ~DWC3_TRB_CTRL_HWO; 856 856 trace_dwc3_complete_trb(ep0, trb); 857 - ep0->trb_enqueue = 0; 857 + 858 + if (r->direction) 859 + dwc->eps[1]->trb_enqueue = 0; 860 + else 861 + dwc->eps[0]->trb_enqueue = 0; 862 + 858 863 dwc->ep0_bounced = false; 859 864 } 860 865
+2
drivers/usb/dwc3/gadget.c
··· 2745 2745 break; 2746 2746 } 2747 2747 2748 + dwc->eps[1]->endpoint.maxpacket = dwc->gadget.ep0->maxpacket; 2749 + 2748 2750 /* Enable USB2 LPM Capability */ 2749 2751 2750 2752 if ((dwc->revision > DWC3_REVISION_194A) &&
+9 -35
drivers/usb/gadget/function/f_fs.c
··· 1855 1855 1856 1856 spin_lock_irqsave(&func->ffs->eps_lock, flags); 1857 1857 while(count--) { 1858 - struct usb_endpoint_descriptor *ds; 1859 - struct usb_ss_ep_comp_descriptor *comp_desc = NULL; 1860 - int needs_comp_desc = false; 1861 - int desc_idx; 1862 - 1863 - if (ffs->gadget->speed == USB_SPEED_SUPER) { 1864 - desc_idx = 2; 1865 - needs_comp_desc = true; 1866 - } else if (ffs->gadget->speed == USB_SPEED_HIGH) 1867 - desc_idx = 1; 1868 - else 1869 - desc_idx = 0; 1870 - 1871 - /* fall-back to lower speed if desc missing for current speed */ 1872 - do { 1873 - ds = ep->descs[desc_idx]; 1874 - } while (!ds && --desc_idx >= 0); 1875 - 1876 - if (!ds) { 1877 - ret = -EINVAL; 1878 - break; 1879 - } 1880 - 1881 1858 ep->ep->driver_data = ep; 1882 - ep->ep->desc = ds; 1883 1859 1884 - if (needs_comp_desc) { 1885 - comp_desc = (struct usb_ss_ep_comp_descriptor *)(ds + 1886 - USB_DT_ENDPOINT_SIZE); 1887 - ep->ep->maxburst = comp_desc->bMaxBurst + 1; 1888 - ep->ep->comp_desc = comp_desc; 1860 + ret = config_ep_by_speed(func->gadget, &func->function, ep->ep); 1861 + if (ret) { 1862 + pr_err("%s: config_ep_by_speed(%s) returned %d\n", 1863 + __func__, ep->ep->name, ret); 1864 + break; 1889 1865 } 1890 1866 1891 1867 ret = usb_ep_enable(ep->ep); 1892 1868 if (likely(!ret)) { 1893 1869 epfile->ep = ep; 1894 - epfile->in = usb_endpoint_dir_in(ds); 1895 - epfile->isoc = usb_endpoint_xfer_isoc(ds); 1870 + epfile->in = usb_endpoint_dir_in(ep->ep->desc); 1871 + epfile->isoc = usb_endpoint_xfer_isoc(ep->ep->desc); 1896 1872 } else { 1897 1873 break; 1898 1874 } ··· 2955 2979 struct ffs_data *ffs = func->ffs; 2956 2980 2957 2981 const int full = !!func->ffs->fs_descs_count; 2958 - const int high = gadget_is_dualspeed(func->gadget) && 2959 - func->ffs->hs_descs_count; 2960 - const int super = gadget_is_superspeed(func->gadget) && 2961 - func->ffs->ss_descs_count; 2982 + const int high = !!func->ffs->hs_descs_count; 2983 + const int super = !!func->ffs->ss_descs_count; 2962 2984 2963 2985 int fs_len, hs_len, ss_len, ret, i; 2964 2986 struct ffs_ep *eps_ptr;
+2
drivers/usb/gadget/function/f_uac2.c
··· 524 524 dev_err(dev, "%s:%d Error!\n", __func__, __LINE__); 525 525 return ret; 526 526 } 527 + iad_desc.bFirstInterface = ret; 528 + 527 529 std_ac_if_desc.bInterfaceNumber = ret; 528 530 uac2->ac_intf = ret; 529 531 uac2->ac_alt = 0;
-1
drivers/usb/gadget/udc/Kconfig
··· 274 274 tristate "Synopsys USB 2.0 Device controller" 275 275 depends on USB_GADGET && OF && HAS_DMA 276 276 depends on EXTCON || EXTCON=n 277 - select USB_GADGET_DUALSPEED 278 277 select USB_SNP_CORE 279 278 default ARCH_BCM_IPROC 280 279 help
+1
drivers/usb/gadget/udc/bdc/bdc_pci.c
··· 77 77 if (ret) { 78 78 dev_err(&pci->dev, 79 79 "couldn't add resources to bdc device\n"); 80 + platform_device_put(bdc); 80 81 return ret; 81 82 } 82 83
+1 -1
drivers/usb/gadget/udc/core.c
··· 180 180 void usb_ep_free_request(struct usb_ep *ep, 181 181 struct usb_request *req) 182 182 { 183 - ep->ops->free_request(ep, req); 184 183 trace_usb_ep_free_request(ep, req, 0); 184 + ep->ops->free_request(ep, req); 185 185 } 186 186 EXPORT_SYMBOL_GPL(usb_ep_free_request); 187 187
+2 -2
drivers/usb/gadget/udc/fsl_udc_core.c
··· 1305 1305 { 1306 1306 struct fsl_ep *ep = get_ep_by_pipe(udc, pipe); 1307 1307 1308 - if (ep->name) 1308 + if (ep->ep.name) 1309 1309 nuke(ep, -ESHUTDOWN); 1310 1310 } 1311 1311 ··· 1693 1693 curr_ep = get_ep_by_pipe(udc, i); 1694 1694 1695 1695 /* If the ep is configured */ 1696 - if (curr_ep->name == NULL) { 1696 + if (!curr_ep->ep.name) { 1697 1697 WARNING("Invalid EP?"); 1698 1698 continue; 1699 1699 }
+1 -1
drivers/usb/gadget/udc/renesas_usb3.c
··· 2410 2410 __renesas_usb3_ep_free_request(usb3->ep0_req); 2411 2411 if (usb3->phy) 2412 2412 phy_put(usb3->phy); 2413 - pm_runtime_disable(usb3_to_dev(usb3)); 2413 + pm_runtime_disable(&pdev->dev); 2414 2414 2415 2415 return 0; 2416 2416 }
+2 -2
drivers/usb/host/ehci-hub.c
··· 774 774 atomic_inc(&urb->use_count); 775 775 atomic_inc(&urb->dev->urbnum); 776 776 urb->setup_dma = dma_map_single( 777 - hcd->self.controller, 777 + hcd->self.sysdev, 778 778 urb->setup_packet, 779 779 sizeof(struct usb_ctrlrequest), 780 780 DMA_TO_DEVICE); 781 781 urb->transfer_dma = dma_map_single( 782 - hcd->self.controller, 782 + hcd->self.sysdev, 783 783 urb->transfer_buffer, 784 784 urb->transfer_buffer_length, 785 785 DMA_FROM_DEVICE);
+4 -8
drivers/usb/host/ehci-q.c
··· 1188 1188 * 15 secs after the setup 1189 1189 */ 1190 1190 if (is_setup) { 1191 - /* SETUP pid */ 1191 + /* SETUP pid, and interrupt after SETUP completion */ 1192 1192 qtd_fill(ehci, qtd, urb->setup_dma, 1193 1193 sizeof(struct usb_ctrlrequest), 1194 - token | (2 /* "setup" */ << 8), 8); 1194 + QTD_IOC | token | (2 /* "setup" */ << 8), 8); 1195 1195 1196 1196 submit_async(ehci, urb, &qtd_list, GFP_ATOMIC); 1197 1197 return 0; /*Return now; we shall come back after 15 seconds*/ ··· 1228 1228 qtd_prev->hw_next = QTD_NEXT(ehci, qtd->qtd_dma); 1229 1229 list_add_tail(&qtd->qtd_list, head); 1230 1230 1231 - /* dont fill any data in such packets */ 1232 - qtd_fill(ehci, qtd, 0, 0, token, 0); 1233 - 1234 - /* by default, enable interrupt on urb completion */ 1235 - if (likely(!(urb->transfer_flags & URB_NO_INTERRUPT))) 1236 - qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC); 1231 + /* Interrupt after STATUS completion */ 1232 + qtd_fill(ehci, qtd, 0, 0, token | QTD_IOC, 0); 1237 1233 1238 1234 submit_async(ehci, urb, &qtd_list, GFP_KERNEL); 1239 1235
+7 -3
drivers/usb/host/ohci-hcd.c
··· 74 74 75 75 #define STATECHANGE_DELAY msecs_to_jiffies(300) 76 76 #define IO_WATCHDOG_DELAY msecs_to_jiffies(275) 77 + #define IO_WATCHDOG_OFF 0xffffff00 77 78 78 79 #include "ohci.h" 79 80 #include "pci-quirks.h" ··· 232 231 } 233 232 234 233 /* Start up the I/O watchdog timer, if it's not running */ 235 - if (!timer_pending(&ohci->io_watchdog) && 234 + if (ohci->prev_frame_no == IO_WATCHDOG_OFF && 236 235 list_empty(&ohci->eds_in_use) && 237 236 !(ohci->flags & OHCI_QUIRK_QEMU)) { 238 237 ohci->prev_frame_no = ohci_frame_no(ohci); ··· 502 501 return 0; 503 502 504 503 timer_setup(&ohci->io_watchdog, io_watchdog_func, 0); 504 + ohci->prev_frame_no = IO_WATCHDOG_OFF; 505 505 506 506 ohci->hcca = dma_alloc_coherent (hcd->self.controller, 507 507 sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL); ··· 732 730 u32 head; 733 731 struct ed *ed; 734 732 struct td *td, *td_start, *td_next; 735 - unsigned frame_no; 733 + unsigned frame_no, prev_frame_no = IO_WATCHDOG_OFF; 736 734 unsigned long flags; 737 735 738 736 spin_lock_irqsave(&ohci->lock, flags); ··· 837 835 } 838 836 } 839 837 if (!list_empty(&ohci->eds_in_use)) { 840 - ohci->prev_frame_no = frame_no; 838 + prev_frame_no = frame_no; 841 839 ohci->prev_wdh_cnt = ohci->wdh_cnt; 842 840 ohci->prev_donehead = ohci_readl(ohci, 843 841 &ohci->regs->donehead); ··· 847 845 } 848 846 849 847 done: 848 + ohci->prev_frame_no = prev_frame_no; 850 849 spin_unlock_irqrestore(&ohci->lock, flags); 851 850 } 852 851 ··· 976 973 if (quirk_nec(ohci)) 977 974 flush_work(&ohci->nec_work); 978 975 del_timer_sync(&ohci->io_watchdog); 976 + ohci->prev_frame_no = IO_WATCHDOG_OFF; 979 977 980 978 ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); 981 979 ohci_usb_reset(ohci);
+3 -1
drivers/usb/host/ohci-hub.c
··· 311 311 rc = ohci_rh_suspend (ohci, 0); 312 312 spin_unlock_irq (&ohci->lock); 313 313 314 - if (rc == 0) 314 + if (rc == 0) { 315 315 del_timer_sync(&ohci->io_watchdog); 316 + ohci->prev_frame_no = IO_WATCHDOG_OFF; 317 + } 316 318 return rc; 317 319 } 318 320
+10 -7
drivers/usb/host/ohci-q.c
··· 1019 1019 * have modified this list. normally it's just prepending 1020 1020 * entries (which we'd ignore), but paranoia won't hurt. 1021 1021 */ 1022 + *last = ed->ed_next; 1023 + ed->ed_next = NULL; 1022 1024 modified = 0; 1023 1025 1024 1026 /* unlink urbs as requested, but rescan the list after ··· 1079 1077 goto rescan_this; 1080 1078 1081 1079 /* 1082 - * If no TDs are queued, take ED off the ed_rm_list. 1080 + * If no TDs are queued, ED is now idle. 1083 1081 * Otherwise, if the HC is running, reschedule. 1084 - * If not, leave it on the list for further dequeues. 1082 + * If the HC isn't running, add ED back to the 1083 + * start of the list for later processing. 1085 1084 */ 1086 1085 if (list_empty(&ed->td_list)) { 1087 - *last = ed->ed_next; 1088 - ed->ed_next = NULL; 1089 1086 ed->state = ED_IDLE; 1090 1087 list_del(&ed->in_use_list); 1091 1088 } else if (ohci->rh_state == OHCI_RH_RUNNING) { 1092 - *last = ed->ed_next; 1093 - ed->ed_next = NULL; 1094 1089 ed_schedule(ohci, ed); 1095 1090 } else { 1096 - last = &ed->ed_next; 1091 + ed->ed_next = ohci->ed_rm_list; 1092 + ohci->ed_rm_list = ed; 1093 + /* Don't loop on the same ED */ 1094 + if (last == &ohci->ed_rm_list) 1095 + last = &ed->ed_next; 1097 1096 } 1098 1097 1099 1098 if (modified)
+109
drivers/usb/host/pci-quirks.c
··· 66 66 #define AX_INDXC 0x30 67 67 #define AX_DATAC 0x34 68 68 69 + #define PT_ADDR_INDX 0xE8 70 + #define PT_READ_INDX 0xE4 71 + #define PT_SIG_1_ADDR 0xA520 72 + #define PT_SIG_2_ADDR 0xA521 73 + #define PT_SIG_3_ADDR 0xA522 74 + #define PT_SIG_4_ADDR 0xA523 75 + #define PT_SIG_1_DATA 0x78 76 + #define PT_SIG_2_DATA 0x56 77 + #define PT_SIG_3_DATA 0x34 78 + #define PT_SIG_4_DATA 0x12 79 + #define PT4_P1_REG 0xB521 80 + #define PT4_P2_REG 0xB522 81 + #define PT2_P1_REG 0xD520 82 + #define PT2_P2_REG 0xD521 83 + #define PT1_P1_REG 0xD522 84 + #define PT1_P2_REG 0xD523 85 + 69 86 #define NB_PCIE_INDX_ADDR 0xe0 70 87 #define NB_PCIE_INDX_DATA 0xe4 71 88 #define PCIE_P_CNTL 0x10040 ··· 528 511 pci_dev_put(smbus); 529 512 } 530 513 EXPORT_SYMBOL_GPL(usb_amd_dev_put); 514 + 515 + /* 516 + * Check if port is disabled in BIOS on AMD Promontory host. 517 + * BIOS Disabled ports may wake on connect/disconnect and need 518 + * driver workaround to keep them disabled. 519 + * Returns true if port is marked disabled. 520 + */ 521 + bool usb_amd_pt_check_port(struct device *device, int port) 522 + { 523 + unsigned char value, port_shift; 524 + struct pci_dev *pdev; 525 + u16 reg; 526 + 527 + pdev = to_pci_dev(device); 528 + pci_write_config_word(pdev, PT_ADDR_INDX, PT_SIG_1_ADDR); 529 + 530 + pci_read_config_byte(pdev, PT_READ_INDX, &value); 531 + if (value != PT_SIG_1_DATA) 532 + return false; 533 + 534 + pci_write_config_word(pdev, PT_ADDR_INDX, PT_SIG_2_ADDR); 535 + 536 + pci_read_config_byte(pdev, PT_READ_INDX, &value); 537 + if (value != PT_SIG_2_DATA) 538 + return false; 539 + 540 + pci_write_config_word(pdev, PT_ADDR_INDX, PT_SIG_3_ADDR); 541 + 542 + pci_read_config_byte(pdev, PT_READ_INDX, &value); 543 + if (value != PT_SIG_3_DATA) 544 + return false; 545 + 546 + pci_write_config_word(pdev, PT_ADDR_INDX, PT_SIG_4_ADDR); 547 + 548 + pci_read_config_byte(pdev, PT_READ_INDX, &value); 549 + if (value != PT_SIG_4_DATA) 550 + return false; 551 + 552 + /* Check disabled port setting, if bit is set port is enabled */ 553 + switch (pdev->device) { 554 + case 0x43b9: 555 + case 0x43ba: 556 + /* 557 + * device is AMD_PROMONTORYA_4(0x43b9) or PROMONTORYA_3(0x43ba) 558 + * PT4_P1_REG bits[7..1] represents USB2.0 ports 6 to 0 559 + * PT4_P2_REG bits[6..0] represents ports 13 to 7 560 + */ 561 + if (port > 6) { 562 + reg = PT4_P2_REG; 563 + port_shift = port - 7; 564 + } else { 565 + reg = PT4_P1_REG; 566 + port_shift = port + 1; 567 + } 568 + break; 569 + case 0x43bb: 570 + /* 571 + * device is AMD_PROMONTORYA_2(0x43bb) 572 + * PT2_P1_REG bits[7..5] represents USB2.0 ports 2 to 0 573 + * PT2_P2_REG bits[5..0] represents ports 9 to 3 574 + */ 575 + if (port > 2) { 576 + reg = PT2_P2_REG; 577 + port_shift = port - 3; 578 + } else { 579 + reg = PT2_P1_REG; 580 + port_shift = port + 5; 581 + } 582 + break; 583 + case 0x43bc: 584 + /* 585 + * device is AMD_PROMONTORYA_1(0x43bc) 586 + * PT1_P1_REG[7..4] represents USB2.0 ports 3 to 0 587 + * PT1_P2_REG[5..0] represents ports 9 to 4 588 + */ 589 + if (port > 3) { 590 + reg = PT1_P2_REG; 591 + port_shift = port - 4; 592 + } else { 593 + reg = PT1_P1_REG; 594 + port_shift = port + 4; 595 + } 596 + break; 597 + default: 598 + return false; 599 + } 600 + pci_write_config_word(pdev, PT_ADDR_INDX, reg); 601 + pci_read_config_byte(pdev, PT_READ_INDX, &value); 602 + 603 + return !(value & BIT(port_shift)); 604 + } 605 + EXPORT_SYMBOL_GPL(usb_amd_pt_check_port); 531 606 532 607 /* 533 608 * Make sure the controller is completely inactive, unable to
+5
drivers/usb/host/pci-quirks.h
··· 17 17 void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 18 18 void sb800_prefetch(struct device *dev, int on); 19 19 bool usb_xhci_needs_pci_reset(struct pci_dev *pdev); 20 + bool usb_amd_pt_check_port(struct device *device, int port); 20 21 #else 21 22 struct pci_dev; 22 23 static inline void usb_amd_quirk_pll_disable(void) {} ··· 26 25 static inline void usb_amd_dev_put(void) {} 27 26 static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 28 27 static inline void sb800_prefetch(struct device *dev, int on) {} 28 + static inline bool usb_amd_pt_check_port(struct device *device, int port) 29 + { 30 + return false; 31 + } 29 32 #endif /* CONFIG_USB_PCI */ 30 33 31 34 #endif /* __LINUX_USB_PCI_QUIRKS_H */
+2 -2
drivers/usb/host/xhci-debugfs.c
··· 211 211 static int xhci_ring_trb_show(struct seq_file *s, void *unused) 212 212 { 213 213 int i; 214 - struct xhci_ring *ring = s->private; 214 + struct xhci_ring *ring = *(struct xhci_ring **)s->private; 215 215 struct xhci_segment *seg = ring->first_seg; 216 216 217 217 for (i = 0; i < ring->num_segs; i++) { ··· 387 387 388 388 snprintf(epriv->name, sizeof(epriv->name), "ep%02d", ep_index); 389 389 epriv->root = xhci_debugfs_create_ring_dir(xhci, 390 - &dev->eps[ep_index].new_ring, 390 + &dev->eps[ep_index].ring, 391 391 epriv->name, 392 392 spriv->root); 393 393 spriv->eps[ep_index] = epriv;
+16 -9
drivers/usb/host/xhci-hub.c
··· 1224 1224 temp = readl(port_array[wIndex]); 1225 1225 break; 1226 1226 } 1227 - 1228 - /* Software should not attempt to set 1229 - * port link state above '3' (U3) and the port 1230 - * must be enabled. 1231 - */ 1232 - if ((temp & PORT_PE) == 0 || 1233 - (link_state > USB_SS_PORT_LS_U3)) { 1234 - xhci_warn(xhci, "Cannot set link state.\n"); 1227 + /* Port must be enabled */ 1228 + if (!(temp & PORT_PE)) { 1229 + retval = -ENODEV; 1230 + break; 1231 + } 1232 + /* Can't set port link state above '3' (U3) */ 1233 + if (link_state > USB_SS_PORT_LS_U3) { 1234 + xhci_warn(xhci, "Cannot set port %d link state %d\n", 1235 + wIndex, link_state); 1235 1236 goto error; 1236 1237 } 1237 - 1238 1238 if (link_state == USB_SS_PORT_LS_U3) { 1239 1239 slot_id = xhci_find_slot_id_by_port(hcd, xhci, 1240 1240 wIndex + 1); ··· 1521 1521 } else { 1522 1522 t2 |= PORT_WKOC_E | PORT_WKCONN_E; 1523 1523 t2 &= ~PORT_WKDISC_E; 1524 + } 1525 + 1526 + if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && 1527 + (hcd->speed < HCD_USB3)) { 1528 + if (usb_amd_pt_check_port(hcd->self.controller, 1529 + port_index)) 1530 + t2 &= ~PORT_WAKE_BITS; 1524 1531 } 1525 1532 } else 1526 1533 t2 &= ~PORT_WAKE_BITS;
+11
drivers/usb/host/xhci-pci.c
··· 42 42 #define PCI_DEVICE_ID_INTEL_APL_XHCI 0x5aa8 43 43 #define PCI_DEVICE_ID_INTEL_DNV_XHCI 0x19d0 44 44 45 + #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9 46 + #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba 47 + #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb 48 + #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc 45 49 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 46 50 47 51 static const char hcd_name[] = "xhci_hcd"; ··· 128 124 129 125 if (pdev->vendor == PCI_VENDOR_ID_AMD) 130 126 xhci->quirks |= XHCI_TRUST_TX_LENGTH; 127 + 128 + if ((pdev->vendor == PCI_VENDOR_ID_AMD) && 129 + ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) || 130 + (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) || 131 + (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) || 132 + (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1))) 133 + xhci->quirks |= XHCI_U2_DISABLE_WAKE; 131 134 132 135 if (pdev->vendor == PCI_VENDOR_ID_INTEL) { 133 136 xhci->quirks |= XHCI_LPM_SUPPORT;
+4 -6
drivers/usb/host/xhci.c
··· 646 646 return; 647 647 } 648 648 649 - xhci_debugfs_exit(xhci); 650 - 651 649 xhci_dbc_exit(xhci); 652 650 653 651 spin_lock_irq(&xhci->lock); ··· 678 680 679 681 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "cleaning up memory"); 680 682 xhci_mem_cleanup(xhci); 683 + xhci_debugfs_exit(xhci); 681 684 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 682 685 "xhci_stop completed - status = %x", 683 686 readl(&xhci->op_regs->status)); ··· 1013 1014 1014 1015 xhci_dbg(xhci, "cleaning up memory\n"); 1015 1016 xhci_mem_cleanup(xhci); 1017 + xhci_debugfs_exit(xhci); 1016 1018 xhci_dbg(xhci, "xhci_stop completed - status = %x\n", 1017 1019 readl(&xhci->op_regs->status)); 1018 1020 ··· 3544 3544 virt_dev->eps[i].ep_state &= ~EP_STOP_CMD_PENDING; 3545 3545 del_timer_sync(&virt_dev->eps[i].stop_cmd_timer); 3546 3546 } 3547 - 3547 + xhci_debugfs_remove_slot(xhci, udev->slot_id); 3548 3548 ret = xhci_disable_slot(xhci, udev->slot_id); 3549 - if (ret) { 3550 - xhci_debugfs_remove_slot(xhci, udev->slot_id); 3549 + if (ret) 3551 3550 xhci_free_virt_device(xhci, udev->slot_id); 3552 - } 3553 3551 } 3554 3552 3555 3553 int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id)
+1 -1
drivers/usb/host/xhci.h
··· 1822 1822 /* For controller with a broken Port Disable implementation */ 1823 1823 #define XHCI_BROKEN_PORT_PED (1 << 25) 1824 1824 #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) 1825 - /* Reserved. It was XHCI_U2_DISABLE_WAKE */ 1825 + #define XHCI_U2_DISABLE_WAKE (1 << 27) 1826 1826 #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28) 1827 1827 #define XHCI_HW_LPM_DISABLE (1 << 29) 1828 1828
+6
drivers/usb/misc/ldusb.c
··· 42 42 #define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033 /* USB Product ID of Micro-CASSY Time (reserved) */ 43 43 #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035 /* USB Product ID of Micro-CASSY Temperature */ 44 44 #define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 /* USB Product ID of Micro-CASSY pH */ 45 + #define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040 /* USB Product ID of Power Analyser CASSY */ 46 + #define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042 /* USB Product ID of Converter Controller CASSY */ 47 + #define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043 /* USB Product ID of Machine Test CASSY */ 45 48 #define USB_DEVICE_ID_LD_JWM 0x1080 /* USB Product ID of Joule and Wattmeter */ 46 49 #define USB_DEVICE_ID_LD_DMMP 0x1081 /* USB Product ID of Digital Multimeter P (reserved) */ 47 50 #define USB_DEVICE_ID_LD_UMIP 0x1090 /* USB Product ID of UMI P */ ··· 87 84 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) }, 88 85 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) }, 89 86 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) }, 87 + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) }, 88 + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) }, 89 + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) }, 90 90 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) }, 91 91 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) }, 92 92 { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
+2 -1
drivers/usb/musb/musb_core.c
··· 2708 2708 if ((devctl & mask) != (musb->context.devctl & mask)) 2709 2709 musb->port1_status = 0; 2710 2710 2711 - musb_start(musb); 2711 + musb_enable_interrupts(musb); 2712 + musb_platform_enable(musb); 2712 2713 2713 2714 spin_lock_irqsave(&musb->lock, flags); 2714 2715 error = musb_run_resume_work(musb);
+1 -7
drivers/usb/musb/musb_host.c
··· 391 391 } 392 392 } 393 393 394 - /* 395 - * The pipe must be broken if current urb->status is set, so don't 396 - * start next urb. 397 - * TODO: to minimize the risk of regression, only check urb->status 398 - * for RX, until we have a test case to understand the behavior of TX. 399 - */ 400 - if ((!status || !is_in) && qh && qh->is_ready) { 394 + if (qh != NULL && qh->is_ready) { 401 395 musb_dbg(musb, "... next ep%d %cX urb %p", 402 396 hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh)); 403 397 musb_start_urb(musb, is_in, qh);
+3
drivers/usb/phy/phy-mxs-usb.c
··· 602 602 void __iomem *base = phy->io_priv; 603 603 enum usb_charger_type chgr_type = UNKNOWN_TYPE; 604 604 605 + if (!regmap) 606 + return UNKNOWN_TYPE; 607 + 605 608 if (mxs_charger_data_contact_detect(mxs_phy)) 606 609 return chgr_type; 607 610
+5
drivers/usb/renesas_usbhs/fifo.c
··· 982 982 if ((uintptr_t)pkt->buf & (USBHS_USB_DMAC_XFER_SIZE - 1)) 983 983 goto usbhsf_pio_prepare_pop; 984 984 985 + /* return at this time if the pipe is running */ 986 + if (usbhs_pipe_is_running(pipe)) 987 + return 0; 988 + 985 989 usbhs_pipe_config_change_bfre(pipe, 1); 986 990 987 991 ret = usbhsf_fifo_select(pipe, fifo, 0); ··· 1176 1172 usbhsf_fifo_clear(pipe, fifo); 1177 1173 pkt->actual = usbhs_dma_calc_received_size(pkt, chan, rcv_len); 1178 1174 1175 + usbhs_pipe_running(pipe, 0); 1179 1176 usbhsf_dma_stop(pipe, fifo); 1180 1177 usbhsf_dma_unmap(pkt); 1181 1178 usbhsf_fifo_unselect(pipe, pipe->fifo);
+7
drivers/usb/serial/option.c
··· 241 241 #define QUECTEL_PRODUCT_EC21 0x0121 242 242 #define QUECTEL_PRODUCT_EC25 0x0125 243 243 #define QUECTEL_PRODUCT_BG96 0x0296 244 + #define QUECTEL_PRODUCT_EP06 0x0306 244 245 245 246 #define CMOTECH_VENDOR_ID 0x16d8 246 247 #define CMOTECH_PRODUCT_6001 0x6001 ··· 688 687 689 688 static const struct option_blacklist_info yuga_clm920_nc5_blacklist = { 690 689 .reserved = BIT(1) | BIT(4), 690 + }; 691 + 692 + static const struct option_blacklist_info quectel_ep06_blacklist = { 693 + .reserved = BIT(4) | BIT(5), 691 694 }; 692 695 693 696 static const struct usb_device_id option_ids[] = { ··· 1208 1203 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1209 1204 { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), 1210 1205 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1206 + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06), 1207 + .driver_info = (kernel_ulong_t)&quectel_ep06_blacklist }, 1211 1208 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, 1212 1209 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, 1213 1210 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
+3
drivers/usb/usbip/stub_dev.c
··· 73 73 goto err; 74 74 75 75 sdev->ud.tcp_socket = socket; 76 + sdev->ud.sockfd = sockfd; 76 77 77 78 spin_unlock_irq(&sdev->ud.lock); 78 79 ··· 173 172 if (ud->tcp_socket) { 174 173 sockfd_put(ud->tcp_socket); 175 174 ud->tcp_socket = NULL; 175 + ud->sockfd = -1; 176 176 } 177 177 178 178 /* 3. free used data */ ··· 268 266 sdev->ud.status = SDEV_ST_AVAILABLE; 269 267 spin_lock_init(&sdev->ud.lock); 270 268 sdev->ud.tcp_socket = NULL; 269 + sdev->ud.sockfd = -1; 271 270 272 271 INIT_LIST_HEAD(&sdev->priv_init); 273 272 INIT_LIST_HEAD(&sdev->priv_tx);
+2
drivers/usb/usbip/vhci_hcd.c
··· 984 984 if (vdev->ud.tcp_socket) { 985 985 sockfd_put(vdev->ud.tcp_socket); 986 986 vdev->ud.tcp_socket = NULL; 987 + vdev->ud.sockfd = -1; 987 988 } 988 989 pr_info("release socket\n"); 989 990 ··· 1031 1030 if (ud->tcp_socket) { 1032 1031 sockfd_put(ud->tcp_socket); 1033 1032 ud->tcp_socket = NULL; 1033 + ud->sockfd = -1; 1034 1034 } 1035 1035 ud->status = VDEV_ST_NULL; 1036 1036