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

Pull USB fixes from Greg KH:
"Here are a number of small USB driver fixes for 5.18-rc5 for some
reported issues and new quirks. They include:

- dwc3 driver fixes

- xhci driver fixes

- typec driver fixes

- new usb-serial driver ids

- added new USB devices to existing quirk tables

- other tiny fixes

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

* tag 'usb-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (31 commits)
usb: phy: generic: Get the vbus supply
usb: dwc3: gadget: Return proper request status
usb: dwc3: pci: add support for the Intel Meteor Lake-P
usb: dwc3: core: Only handle soft-reset in DCTL
usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
usb: misc: eud: Fix an error handling path in eud_probe()
usb: core: Don't hold the device lock while sleeping in do_proc_control()
usb: dwc3: Try usb-role-switch first in dwc3_drd_init
usb: dwc3: core: Fix tx/rx threshold settings
usb: mtu3: fix USB 3.0 dual-role-switch from device to host
xhci: Enable runtime PM on second Alderlake controller
usb: dwc3: fix backwards compat with rockchip devices
dt-bindings: usb: samsung,exynos-usb2: add missing required reg
usb: misc: fix improper handling of refcount in uss720_probe()
USB: Fix ehci infinite suspend-resume loop issue in zhaoxin
usb: typec: tcpm: Fix undefined behavior due to shift overflowing the constant
usb: typec: rt1719: Fix build error without CONFIG_POWER_SUPPLY
usb: typec: ucsi: Fix role swapping
usb: typec: ucsi: Fix reuse of completion structure
usb: xhci: tegra:Fix PM usage reference leak of tegra_xusb_unpowergate_partitions
...

+193 -45
+1
Documentation/devicetree/bindings/usb/samsung,exynos-usb2.yaml
··· 62 62 - interrupts 63 63 - phys 64 64 - phy-names 65 + - reg 65 66 66 67 allOf: 67 68 - if:
+5 -2
drivers/usb/cdns3/cdns3-gadget.c
··· 2684 2684 struct usb_request *request; 2685 2685 struct cdns3_request *priv_req; 2686 2686 struct cdns3_trb *trb = NULL; 2687 + struct cdns3_trb trb_tmp; 2687 2688 int ret; 2688 2689 int val; 2689 2690 ··· 2694 2693 if (request) { 2695 2694 priv_req = to_cdns3_request(request); 2696 2695 trb = priv_req->trb; 2697 - if (trb) 2696 + if (trb) { 2697 + trb_tmp = *trb; 2698 2698 trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE); 2699 + } 2699 2700 } 2700 2701 2701 2702 writel(EP_CMD_CSTALL | EP_CMD_EPRST, &priv_dev->regs->ep_cmd); ··· 2712 2709 2713 2710 if (request) { 2714 2711 if (trb) 2715 - trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE); 2712 + *trb = trb_tmp; 2716 2713 2717 2714 cdns3_rearm_transfer(priv_ep, 1); 2718 2715 }
+9 -5
drivers/usb/core/devio.c
··· 1209 1209 1210 1210 usb_unlock_device(dev); 1211 1211 i = usbfs_start_wait_urb(urb, tmo, &actlen); 1212 + 1213 + /* Linger a bit, prior to the next control message. */ 1214 + if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG) 1215 + msleep(200); 1212 1216 usb_lock_device(dev); 1213 1217 snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, tbuf, actlen); 1214 1218 if (!i && actlen) { 1215 1219 if (copy_to_user(ctrl->data, tbuf, actlen)) { 1216 1220 ret = -EFAULT; 1217 - goto recv_fault; 1221 + goto done; 1218 1222 } 1219 1223 } 1220 1224 } else { ··· 1235 1231 1236 1232 usb_unlock_device(dev); 1237 1233 i = usbfs_start_wait_urb(urb, tmo, &actlen); 1234 + 1235 + /* Linger a bit, prior to the next control message. */ 1236 + if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG) 1237 + msleep(200); 1238 1238 usb_lock_device(dev); 1239 1239 snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, NULL, 0); 1240 1240 } ··· 1250 1242 } 1251 1243 ret = (i < 0 ? i : actlen); 1252 1244 1253 - recv_fault: 1254 - /* Linger a bit, prior to the next control message. */ 1255 - if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG) 1256 - msleep(200); 1257 1245 done: 1258 1246 kfree(dr); 1259 1247 usb_free_urb(urb);
+6
drivers/usb/core/quirks.c
··· 404 404 { USB_DEVICE(0x0b05, 0x17e0), .driver_info = 405 405 USB_QUIRK_IGNORE_REMOTE_WAKEUP }, 406 406 407 + /* Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)*/ 408 + { USB_DEVICE(0x0bda, 0x0151), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, 409 + 407 410 /* Realtek hub in Dell WD19 (Type-C) */ 408 411 { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, 409 412 ··· 509 506 510 507 /* DJI CineSSD */ 511 508 { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, 509 + 510 + /* VCOM device */ 511 + { USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, 512 512 513 513 /* INTEL VALUE SSD */ 514 514 { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
+29 -5
drivers/usb/dwc3/core.c
··· 274 274 275 275 reg = dwc3_readl(dwc->regs, DWC3_DCTL); 276 276 reg |= DWC3_DCTL_CSFTRST; 277 - dwc3_writel(dwc->regs, DWC3_DCTL, reg); 277 + reg &= ~DWC3_DCTL_RUN_STOP; 278 + dwc3_gadget_dctl_write_safe(dwc, reg); 278 279 279 280 /* 280 281 * For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit ··· 1378 1377 u8 lpm_nyet_threshold; 1379 1378 u8 tx_de_emphasis; 1380 1379 u8 hird_threshold; 1381 - u8 rx_thr_num_pkt_prd; 1382 - u8 rx_max_burst_prd; 1383 - u8 tx_thr_num_pkt_prd; 1384 - u8 tx_max_burst_prd; 1380 + u8 rx_thr_num_pkt_prd = 0; 1381 + u8 rx_max_burst_prd = 0; 1382 + u8 tx_thr_num_pkt_prd = 0; 1383 + u8 tx_max_burst_prd = 0; 1385 1384 u8 tx_fifo_resize_max_num; 1386 1385 const char *usb_psy_name; 1387 1386 int ret; ··· 1691 1690 /* 1692 1691 * Clocks are optional, but new DT platforms should support all 1693 1692 * clocks as required by the DT-binding. 1693 + * Some devices have different clock names in legacy device trees, 1694 + * check for them to retain backwards compatibility. 1694 1695 */ 1695 1696 dwc->bus_clk = devm_clk_get_optional(dev, "bus_early"); 1696 1697 if (IS_ERR(dwc->bus_clk)) 1697 1698 return dev_err_probe(dev, PTR_ERR(dwc->bus_clk), 1698 1699 "could not get bus clock\n"); 1699 1700 1701 + if (dwc->bus_clk == NULL) { 1702 + dwc->bus_clk = devm_clk_get_optional(dev, "bus_clk"); 1703 + if (IS_ERR(dwc->bus_clk)) 1704 + return dev_err_probe(dev, PTR_ERR(dwc->bus_clk), 1705 + "could not get bus clock\n"); 1706 + } 1707 + 1700 1708 dwc->ref_clk = devm_clk_get_optional(dev, "ref"); 1701 1709 if (IS_ERR(dwc->ref_clk)) 1702 1710 return dev_err_probe(dev, PTR_ERR(dwc->ref_clk), 1703 1711 "could not get ref clock\n"); 1704 1712 1713 + if (dwc->ref_clk == NULL) { 1714 + dwc->ref_clk = devm_clk_get_optional(dev, "ref_clk"); 1715 + if (IS_ERR(dwc->ref_clk)) 1716 + return dev_err_probe(dev, PTR_ERR(dwc->ref_clk), 1717 + "could not get ref clock\n"); 1718 + } 1719 + 1705 1720 dwc->susp_clk = devm_clk_get_optional(dev, "suspend"); 1706 1721 if (IS_ERR(dwc->susp_clk)) 1707 1722 return dev_err_probe(dev, PTR_ERR(dwc->susp_clk), 1708 1723 "could not get suspend clock\n"); 1724 + 1725 + if (dwc->susp_clk == NULL) { 1726 + dwc->susp_clk = devm_clk_get_optional(dev, "suspend_clk"); 1727 + if (IS_ERR(dwc->susp_clk)) 1728 + return dev_err_probe(dev, PTR_ERR(dwc->susp_clk), 1729 + "could not get suspend clock\n"); 1730 + } 1709 1731 } 1710 1732 1711 1733 ret = reset_control_deassert(dwc->reset);
+5 -6
drivers/usb/dwc3/drd.c
··· 584 584 { 585 585 int ret, irq; 586 586 587 + if (ROLE_SWITCH && 588 + device_property_read_bool(dwc->dev, "usb-role-switch")) 589 + return dwc3_setup_role_switch(dwc); 590 + 587 591 dwc->edev = dwc3_get_extcon(dwc); 588 592 if (IS_ERR(dwc->edev)) 589 593 return PTR_ERR(dwc->edev); 590 594 591 - if (ROLE_SWITCH && 592 - device_property_read_bool(dwc->dev, "usb-role-switch")) { 593 - ret = dwc3_setup_role_switch(dwc); 594 - if (ret < 0) 595 - return ret; 596 - } else if (dwc->edev) { 595 + if (dwc->edev) { 597 596 dwc->edev_nb.notifier_call = dwc3_drd_notifier; 598 597 ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST, 599 598 &dwc->edev_nb);
+8
drivers/usb/dwc3/dwc3-pci.c
··· 45 45 #define PCI_DEVICE_ID_INTEL_ADLM 0x54ee 46 46 #define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1 47 47 #define PCI_DEVICE_ID_INTEL_RPLS 0x7a61 48 + #define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1 49 + #define PCI_DEVICE_ID_INTEL_MTL 0x7e7e 48 50 #define PCI_DEVICE_ID_INTEL_TGL 0x9a15 49 51 #define PCI_DEVICE_ID_AMD_MR 0x163a 50 52 ··· 456 454 (kernel_ulong_t) &dwc3_pci_intel_swnode, }, 457 455 458 456 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS), 457 + (kernel_ulong_t) &dwc3_pci_intel_swnode, }, 458 + 459 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP), 460 + (kernel_ulong_t) &dwc3_pci_intel_swnode, }, 461 + 462 + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTL), 459 463 (kernel_ulong_t) &dwc3_pci_intel_swnode, }, 460 464 461 465 { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL),
+30 -1
drivers/usb/dwc3/gadget.c
··· 3274 3274 const struct dwc3_event_depevt *event, 3275 3275 struct dwc3_request *req, int status) 3276 3276 { 3277 + int request_status; 3277 3278 int ret; 3278 3279 3279 3280 if (req->request.num_mapped_sgs) ··· 3295 3294 req->needs_extra_trb = false; 3296 3295 } 3297 3296 3298 - dwc3_gadget_giveback(dep, req, status); 3297 + /* 3298 + * The event status only reflects the status of the TRB with IOC set. 3299 + * For the requests that don't set interrupt on completion, the driver 3300 + * needs to check and return the status of the completed TRBs associated 3301 + * with the request. Use the status of the last TRB of the request. 3302 + */ 3303 + if (req->request.no_interrupt) { 3304 + struct dwc3_trb *trb; 3305 + 3306 + trb = dwc3_ep_prev_trb(dep, dep->trb_dequeue); 3307 + switch (DWC3_TRB_SIZE_TRBSTS(trb->size)) { 3308 + case DWC3_TRBSTS_MISSED_ISOC: 3309 + /* Isoc endpoint only */ 3310 + request_status = -EXDEV; 3311 + break; 3312 + case DWC3_TRB_STS_XFER_IN_PROG: 3313 + /* Applicable when End Transfer with ForceRM=0 */ 3314 + case DWC3_TRBSTS_SETUP_PENDING: 3315 + /* Control endpoint only */ 3316 + case DWC3_TRBSTS_OK: 3317 + default: 3318 + request_status = 0; 3319 + break; 3320 + } 3321 + } else { 3322 + request_status = status; 3323 + } 3324 + 3325 + dwc3_gadget_giveback(dep, req, request_status); 3299 3326 3300 3327 out: 3301 3328 return ret;
+2
drivers/usb/gadget/configfs.c
··· 1438 1438 usb_ep_autoconfig_reset(cdev->gadget); 1439 1439 spin_lock_irqsave(&gi->spinlock, flags); 1440 1440 cdev->gadget = NULL; 1441 + cdev->deactivations = 0; 1442 + gadget->deactivated = false; 1441 1443 set_gadget_data(gadget, NULL); 1442 1444 spin_unlock_irqrestore(&gi->spinlock, flags); 1443 1445 }
+2
drivers/usb/gadget/function/uvc_queue.c
··· 264 264 buf->state = UVC_BUF_STATE_ERROR; 265 265 vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR); 266 266 } 267 + queue->buf_used = 0; 268 + 267 269 /* This must be protected by the irqlock spinlock to avoid race 268 270 * conditions between uvc_queue_buffer and the disconnection event that 269 271 * could result in an interruptible wait in uvc_dequeue_buffer. Do not
+23
drivers/usb/host/ehci-hcd.c
··· 1103 1103 1104 1104 #ifdef CONFIG_PM 1105 1105 1106 + /* Clear wakeup signal locked in zhaoxin platform when device plug in. */ 1107 + static void ehci_zx_wakeup_clear(struct ehci_hcd *ehci) 1108 + { 1109 + u32 __iomem *reg = &ehci->regs->port_status[4]; 1110 + u32 t1 = ehci_readl(ehci, reg); 1111 + 1112 + t1 &= (u32)~0xf0000; 1113 + t1 |= PORT_TEST_FORCE; 1114 + ehci_writel(ehci, t1, reg); 1115 + t1 = ehci_readl(ehci, reg); 1116 + msleep(1); 1117 + t1 &= (u32)~0xf0000; 1118 + ehci_writel(ehci, t1, reg); 1119 + ehci_readl(ehci, reg); 1120 + msleep(1); 1121 + t1 = ehci_readl(ehci, reg); 1122 + ehci_writel(ehci, t1 | PORT_CSC, reg); 1123 + ehci_readl(ehci, reg); 1124 + } 1125 + 1106 1126 /* suspend/resume, section 4.3 */ 1107 1127 1108 1128 /* These routines handle the generic parts of controller suspend/resume */ ··· 1173 1153 1174 1154 if (ehci->shutdown) 1175 1155 return 0; /* Controller is dead */ 1156 + 1157 + if (ehci->zx_wakeup_clear_needed) 1158 + ehci_zx_wakeup_clear(ehci); 1176 1159 1177 1160 /* 1178 1161 * If CF is still set and reset isn't forced
+4
drivers/usb/host/ehci-pci.c
··· 231 231 ehci->is_aspeed = 1; 232 232 } 233 233 break; 234 + case PCI_VENDOR_ID_ZHAOXIN: 235 + if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x90) 236 + ehci->zx_wakeup_clear_needed = 1; 237 + break; 234 238 } 235 239 236 240 /* optional debug port, normally in the first BAR */
+1
drivers/usb/host/ehci.h
··· 220 220 unsigned imx28_write_fix:1; /* For Freescale i.MX28 */ 221 221 unsigned spurious_oc:1; 222 222 unsigned is_aspeed:1; 223 + unsigned zx_wakeup_clear_needed:1; 223 224 224 225 /* required for usb32 quirk */ 225 226 #define OHCI_CTRL_HCFS (3 << 6)
+1 -1
drivers/usb/host/xhci-hub.c
··· 1434 1434 } 1435 1435 spin_unlock_irqrestore(&xhci->lock, flags); 1436 1436 if (!wait_for_completion_timeout(&bus_state->u3exit_done[wIndex], 1437 - msecs_to_jiffies(100))) 1437 + msecs_to_jiffies(500))) 1438 1438 xhci_dbg(xhci, "missing U0 port change event for port %d-%d\n", 1439 1439 hcd->self.busnum, wIndex + 1); 1440 1440 spin_lock_irqsave(&xhci->lock, flags);
+3 -1
drivers/usb/host/xhci-pci.c
··· 59 59 #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13 60 60 #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138 61 61 #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e 62 + #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed 62 63 63 64 #define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639 64 65 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9 ··· 267 266 pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI || 268 267 pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI || 269 268 pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI || 270 - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI)) 269 + pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI || 270 + pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI)) 271 271 xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; 272 272 273 273 if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
+1
drivers/usb/host/xhci-ring.c
··· 3141 3141 if (event_loop++ < TRBS_PER_SEGMENT / 2) 3142 3142 continue; 3143 3143 xhci_update_erst_dequeue(xhci, event_ring_deq); 3144 + event_ring_deq = xhci->event_ring->dequeue; 3144 3145 3145 3146 /* ring is half-full, force isoc trbs to interrupt more often */ 3146 3147 if (xhci->isoc_bei_interval > AVOID_BEI_INTERVAL_MIN)
+2 -2
drivers/usb/host/xhci-tegra.c
··· 1034 1034 int rc; 1035 1035 1036 1036 if (tegra->use_genpd) { 1037 - rc = pm_runtime_get_sync(tegra->genpd_dev_ss); 1037 + rc = pm_runtime_resume_and_get(tegra->genpd_dev_ss); 1038 1038 if (rc < 0) { 1039 1039 dev_err(dev, "failed to enable XUSB SS partition\n"); 1040 1040 return rc; 1041 1041 } 1042 1042 1043 - rc = pm_runtime_get_sync(tegra->genpd_dev_host); 1043 + rc = pm_runtime_resume_and_get(tegra->genpd_dev_host); 1044 1044 if (rc < 0) { 1045 1045 dev_err(dev, "failed to enable XUSB Host partition\n"); 1046 1046 pm_runtime_put_sync(tegra->genpd_dev_ss);
+11
drivers/usb/host/xhci.c
··· 781 781 if (xhci->quirks & XHCI_SPURIOUS_REBOOT) 782 782 usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev)); 783 783 784 + /* Don't poll the roothubs after shutdown. */ 785 + xhci_dbg(xhci, "%s: stopping usb%d port polling.\n", 786 + __func__, hcd->self.busnum); 787 + clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 788 + del_timer_sync(&hcd->rh_timer); 789 + 790 + if (xhci->shared_hcd) { 791 + clear_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); 792 + del_timer_sync(&xhci->shared_hcd->rh_timer); 793 + } 794 + 784 795 spin_lock_irq(&xhci->lock); 785 796 xhci_halt(xhci); 786 797 /* Workaround for spurious wakeups at shutdown with HSW */
+5 -5
drivers/usb/misc/qcom_eud.c
··· 186 186 187 187 chip->dev = &pdev->dev; 188 188 189 - ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip); 190 - if (ret) 191 - return dev_err_probe(chip->dev, ret, 192 - "failed to add role switch release action\n"); 193 - 194 189 chip->role_sw = usb_role_switch_get(&pdev->dev); 195 190 if (IS_ERR(chip->role_sw)) 196 191 return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), 197 192 "failed to get role switch\n"); 193 + 194 + ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip); 195 + if (ret) 196 + return dev_err_probe(chip->dev, ret, 197 + "failed to add role switch release action\n"); 198 198 199 199 chip->base = devm_platform_ioremap_resource(pdev, 0); 200 200 if (IS_ERR(chip->base))
+1 -2
drivers/usb/misc/uss720.c
··· 71 71 72 72 dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n"); 73 73 usb_put_dev(priv->usbdev); 74 + priv->usbdev = NULL; 74 75 kfree(priv); 75 76 } 76 77 ··· 737 736 parport_announce_port(pp); 738 737 739 738 usb_set_intfdata(intf, pp); 740 - usb_put_dev(usbdev); 741 739 return 0; 742 740 743 741 probe_abort: ··· 754 754 usb_set_intfdata(intf, NULL); 755 755 if (pp) { 756 756 priv = pp->private_data; 757 - priv->usbdev = NULL; 758 757 priv->pp = NULL; 759 758 dev_dbg(&intf->dev, "parport_remove_port\n"); 760 759 parport_remove_port(pp);
+2 -4
drivers/usb/mtu3/mtu3_dr.c
··· 21 21 22 22 static void toggle_opstate(struct ssusb_mtk *ssusb) 23 23 { 24 - if (!ssusb->otg_switch.is_u3_drd) { 25 - mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION); 26 - mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN); 27 - } 24 + mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION); 25 + mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN); 28 26 } 29 27 30 28 /* only port0 supports dual-role mode */
+7
drivers/usb/phy/phy-generic.c
··· 268 268 return -EPROBE_DEFER; 269 269 } 270 270 271 + nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); 272 + if (PTR_ERR(nop->vbus_draw) == -ENODEV) 273 + nop->vbus_draw = NULL; 274 + if (IS_ERR(nop->vbus_draw)) 275 + return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), 276 + "could not get vbus regulator\n"); 277 + 271 278 nop->dev = dev; 272 279 nop->phy.dev = nop->dev; 273 280 nop->phy.label = "nop-xceiv";
+2
drivers/usb/serial/cp210x.c
··· 194 194 { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ 195 195 { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ 196 196 { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ 197 + { USB_DEVICE(0x17A8, 0x0101) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Int Ant) */ 198 + { USB_DEVICE(0x17A8, 0x0102) }, /* Kamstrup 868 MHz wM-Bus C-Mode Meter Reader (Ext Ant) */ 197 199 { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ 198 200 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ 199 201 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+12
drivers/usb/serial/option.c
··· 432 432 #define CINTERION_PRODUCT_CLS8 0x00b0 433 433 #define CINTERION_PRODUCT_MV31_MBIM 0x00b3 434 434 #define CINTERION_PRODUCT_MV31_RMNET 0x00b7 435 + #define CINTERION_PRODUCT_MV32_WA 0x00f1 436 + #define CINTERION_PRODUCT_MV32_WB 0x00f2 435 437 436 438 /* Olivetti products */ 437 439 #define OLIVETTI_VENDOR_ID 0x0b3c ··· 1219 1217 .driver_info = NCTRL(0) | RSVD(1) }, 1220 1218 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ 1221 1219 .driver_info = NCTRL(2) | RSVD(3) }, 1220 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1057, 0xff), /* Telit FN980 */ 1221 + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, 1222 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1058, 0xff), /* Telit FN980 (PCIe) */ 1223 + .driver_info = NCTRL(0) | RSVD(1) }, 1222 1224 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1060, 0xff), /* Telit LN920 (rmnet) */ 1223 1225 .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, 1224 1226 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1061, 0xff), /* Telit LN920 (MBIM) */ ··· 1239 1233 .driver_info = NCTRL(2) | RSVD(3) }, 1240 1234 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */ 1241 1235 .driver_info = NCTRL(0) | RSVD(1) }, 1236 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */ 1237 + .driver_info = RSVD(0) }, 1242 1238 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), 1243 1239 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, 1244 1240 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), ··· 1977 1969 .driver_info = RSVD(3)}, 1978 1970 { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV31_RMNET, 0xff), 1979 1971 .driver_info = RSVD(0)}, 1972 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WA, 0xff), 1973 + .driver_info = RSVD(3)}, 1974 + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_MV32_WB, 0xff), 1975 + .driver_info = RSVD(3)}, 1980 1976 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100), 1981 1977 .driver_info = RSVD(4) }, 1982 1978 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD120),
+2 -3
drivers/usb/serial/whiteheat.c
··· 584 584 switch (command) { 585 585 case WHITEHEAT_GET_DTR_RTS: 586 586 info = usb_get_serial_port_data(port); 587 - memcpy(&info->mcr, command_info->result_buffer, 588 - sizeof(struct whiteheat_dr_info)); 589 - break; 587 + info->mcr = command_info->result_buffer[0]; 588 + break; 590 589 } 591 590 } 592 591 exit:
+1
drivers/usb/typec/Kconfig
··· 56 56 tristate "Richtek RT1719 Sink Only Type-C controller driver" 57 57 depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH 58 58 depends on I2C 59 + depends on POWER_SUPPLY 59 60 select REGMAP_I2C 60 61 help 61 62 Say Y or M here if your system has Richtek RT1719 sink only
+17 -7
drivers/usb/typec/ucsi/ucsi.c
··· 949 949 role == TYPEC_HOST)) 950 950 goto out_unlock; 951 951 952 + reinit_completion(&con->complete); 953 + 952 954 command = UCSI_SET_UOR | UCSI_CONNECTOR_NUMBER(con->num); 953 955 command |= UCSI_SET_UOR_ROLE(role); 954 956 command |= UCSI_SET_UOR_ACCEPT_ROLE_SWAPS; ··· 958 956 if (ret < 0) 959 957 goto out_unlock; 960 958 959 + mutex_unlock(&con->lock); 960 + 961 961 if (!wait_for_completion_timeout(&con->complete, 962 - msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) 963 - ret = -ETIMEDOUT; 962 + msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) 963 + return -ETIMEDOUT; 964 + 965 + return 0; 964 966 965 967 out_unlock: 966 968 mutex_unlock(&con->lock); 967 969 968 - return ret < 0 ? ret : 0; 970 + return ret; 969 971 } 970 972 971 973 static int ucsi_pr_swap(struct typec_port *port, enum typec_role role) ··· 991 985 if (cur_role == role) 992 986 goto out_unlock; 993 987 988 + reinit_completion(&con->complete); 989 + 994 990 command = UCSI_SET_PDR | UCSI_CONNECTOR_NUMBER(con->num); 995 991 command |= UCSI_SET_PDR_ROLE(role); 996 992 command |= UCSI_SET_PDR_ACCEPT_ROLE_SWAPS; ··· 1000 992 if (ret < 0) 1001 993 goto out_unlock; 1002 994 995 + mutex_unlock(&con->lock); 996 + 1003 997 if (!wait_for_completion_timeout(&con->complete, 1004 - msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) { 1005 - ret = -ETIMEDOUT; 1006 - goto out_unlock; 1007 - } 998 + msecs_to_jiffies(UCSI_SWAP_TIMEOUT_MS))) 999 + return -ETIMEDOUT; 1000 + 1001 + mutex_lock(&con->lock); 1008 1002 1009 1003 /* Something has gone wrong while swapping the role */ 1010 1004 if (UCSI_CONSTAT_PWR_OPMODE(con->status.flags) !=
+1 -1
include/linux/usb/pd_bdo.h
··· 15 15 #define BDO_MODE_CARRIER2 (5 << 28) 16 16 #define BDO_MODE_CARRIER3 (6 << 28) 17 17 #define BDO_MODE_EYE (7 << 28) 18 - #define BDO_MODE_TESTDATA (8 << 28) 18 + #define BDO_MODE_TESTDATA (8U << 28) 19 19 20 20 #define BDO_MODE_MASK(mode) ((mode) & 0xf0000000) 21 21