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

Pull USB driver fixes from Greg KH:
"Here are some small USB driver fixes for 5.14-rc5. They resolve a
number of small reported issues, including:

- cdnsp driver fixes

- usb serial driver fixes and device id updates

- usb gadget hid fixes

- usb host driver fixes

- usb dwc3 driver fixes

- other usb gadget driver fixes

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

* tag 'usb-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events
usb: dwc3: gadget: Avoid runtime resume if disabling pullup
usb: dwc3: gadget: Use list_replace_init() before traversing lists
USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
USB: serial: pl2303: fix GT type detection
USB: serial: option: add Telit FD980 composition 0x1056
USB: serial: pl2303: fix HX type detection
USB: serial: ch341: fix character loss at high transfer rates
usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro
usb: cdnsp: Fixed issue with ZLP
usb: cdnsp: Fix incorrect supported maximum speed
usb: cdns3: Fixed incorrect gadget state
usb: gadget: f_hid: idle uses the highest byte for duration
Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"
usb: otg-fsm: Fix hrtimer list corruption
usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses
usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI
usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers
usb: gadget: f_hid: fixed NULL pointer dereference
usb: gadget: remove leaked entry from udc driver list
...

+174 -76
+1 -14
drivers/thunderbolt/switch.c
··· 1875 1875 NULL, 1876 1876 }; 1877 1877 1878 - static bool has_port(const struct tb_switch *sw, enum tb_port_type type) 1879 - { 1880 - const struct tb_port *port; 1881 - 1882 - tb_switch_for_each_port(sw, port) { 1883 - if (!port->disabled && port->config.type == type) 1884 - return true; 1885 - } 1886 - 1887 - return false; 1888 - } 1889 - 1890 1878 static umode_t switch_attr_is_visible(struct kobject *kobj, 1891 1879 struct attribute *attr, int n) 1892 1880 { ··· 1883 1895 1884 1896 if (attr == &dev_attr_authorized.attr) { 1885 1897 if (sw->tb->security_level == TB_SECURITY_NOPCIE || 1886 - sw->tb->security_level == TB_SECURITY_DPONLY || 1887 - !has_port(sw, TB_TYPE_PCIE_UP)) 1898 + sw->tb->security_level == TB_SECURITY_DPONLY) 1888 1899 return 0; 1889 1900 } else if (attr == &dev_attr_device.attr) { 1890 1901 if (!sw->device)
+1
drivers/usb/cdns3/cdns3-ep0.c
··· 731 731 request->actual = 0; 732 732 priv_dev->status_completion_no_call = true; 733 733 priv_dev->pending_status_request = request; 734 + usb_gadget_set_state(&priv_dev->gadget, USB_STATE_CONFIGURED); 734 735 spin_unlock_irqrestore(&priv_dev->lock, flags); 735 736 736 737 /*
+1 -1
drivers/usb/cdns3/cdnsp-gadget.c
··· 1882 1882 pdev->gadget.name = "cdnsp-gadget"; 1883 1883 pdev->gadget.speed = USB_SPEED_UNKNOWN; 1884 1884 pdev->gadget.sg_supported = 1; 1885 - pdev->gadget.max_speed = USB_SPEED_SUPER_PLUS; 1885 + pdev->gadget.max_speed = max_speed; 1886 1886 pdev->gadget.lpm_capable = 1; 1887 1887 1888 1888 pdev->setup_buf = kzalloc(CDNSP_EP0_SETUP_SIZE, GFP_KERNEL);
+2 -2
drivers/usb/cdns3/cdnsp-gadget.h
··· 383 383 #define IMAN_IE BIT(1) 384 384 #define IMAN_IP BIT(0) 385 385 /* bits 2:31 need to be preserved */ 386 - #define IMAN_IE_SET(p) (((p) & IMAN_IE) | 0x2) 387 - #define IMAN_IE_CLEAR(p) (((p) & IMAN_IE) & ~(0x2)) 386 + #define IMAN_IE_SET(p) ((p) | IMAN_IE) 387 + #define IMAN_IE_CLEAR(p) ((p) & ~IMAN_IE) 388 388 389 389 /* IMOD - Interrupter Moderation Register - irq_control bitmasks. */ 390 390 /*
+8 -10
drivers/usb/cdns3/cdnsp-ring.c
··· 1932 1932 } 1933 1933 1934 1934 if (enqd_len + trb_buff_len >= full_len) { 1935 - if (need_zero_pkt && zero_len_trb) { 1936 - zero_len_trb = true; 1937 - } else { 1938 - field &= ~TRB_CHAIN; 1939 - field |= TRB_IOC; 1940 - more_trbs_coming = false; 1941 - need_zero_pkt = false; 1942 - preq->td.last_trb = ring->enqueue; 1943 - } 1935 + if (need_zero_pkt) 1936 + zero_len_trb = !zero_len_trb; 1937 + 1938 + field &= ~TRB_CHAIN; 1939 + field |= TRB_IOC; 1940 + more_trbs_coming = false; 1941 + preq->td.last_trb = ring->enqueue; 1944 1942 } 1945 1943 1946 1944 /* Only set interrupt on short packet for OUT endpoints. */ ··· 1953 1955 length_field = TRB_LEN(trb_buff_len) | TRB_TD_SIZE(remainder) | 1954 1956 TRB_INTR_TARGET(0); 1955 1957 1956 - cdnsp_queue_trb(pdev, ring, more_trbs_coming | need_zero_pkt, 1958 + cdnsp_queue_trb(pdev, ring, more_trbs_coming | zero_len_trb, 1957 1959 lower_32_bits(send_addr), 1958 1960 upper_32_bits(send_addr), 1959 1961 length_field,
+1 -8
drivers/usb/class/usbtmc.c
··· 2324 2324 dev_err(dev, "overflow with length %d, actual length is %d\n", 2325 2325 data->iin_wMaxPacketSize, urb->actual_length); 2326 2326 fallthrough; 2327 - case -ECONNRESET: 2328 - case -ENOENT: 2329 - case -ESHUTDOWN: 2330 - case -EILSEQ: 2331 - case -ETIME: 2332 - case -EPIPE: 2327 + default: 2333 2328 /* urb terminated, clean up */ 2334 2329 dev_dbg(dev, "urb terminated, status: %d\n", status); 2335 2330 return; 2336 - default: 2337 - dev_err(dev, "unknown status received: %d\n", status); 2338 2331 } 2339 2332 exit: 2340 2333 rv = usb_submit_urb(urb, GFP_ATOMIC);
+5 -1
drivers/usb/common/usb-otg-fsm.c
··· 193 193 if (!fsm->host_req_flag) 194 194 return; 195 195 196 - INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work); 196 + if (!fsm->hnp_work_inited) { 197 + INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work); 198 + fsm->hnp_work_inited = true; 199 + } 200 + 197 201 schedule_delayed_work(&fsm->hnp_polling_work, 198 202 msecs_to_jiffies(T_HOST_REQ_POLL)); 199 203 }
+27 -2
drivers/usb/dwc3/gadget.c
··· 1741 1741 { 1742 1742 struct dwc3_request *req; 1743 1743 struct dwc3_request *tmp; 1744 + struct list_head local; 1744 1745 struct dwc3 *dwc = dep->dwc; 1745 1746 1746 - list_for_each_entry_safe(req, tmp, &dep->cancelled_list, list) { 1747 + restart: 1748 + list_replace_init(&dep->cancelled_list, &local); 1749 + 1750 + list_for_each_entry_safe(req, tmp, &local, list) { 1747 1751 dwc3_gadget_ep_skip_trbs(dep, req); 1748 1752 switch (req->status) { 1749 1753 case DWC3_REQUEST_STATUS_DISCONNECTED: ··· 1765 1761 break; 1766 1762 } 1767 1763 } 1764 + 1765 + if (!list_empty(&dep->cancelled_list)) 1766 + goto restart; 1768 1767 } 1769 1768 1770 1769 static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, ··· 2254 2247 dev_err(dwc->dev, "timed out waiting for SETUP phase\n"); 2255 2248 return -ETIMEDOUT; 2256 2249 } 2250 + } 2251 + 2252 + /* 2253 + * Avoid issuing a runtime resume if the device is already in the 2254 + * suspended state during gadget disconnect. DWC3 gadget was already 2255 + * halted/stopped during runtime suspend. 2256 + */ 2257 + if (!is_on) { 2258 + pm_runtime_barrier(dwc->dev); 2259 + if (pm_runtime_suspended(dwc->dev)) 2260 + return 0; 2257 2261 } 2258 2262 2259 2263 /* ··· 2976 2958 { 2977 2959 struct dwc3_request *req; 2978 2960 struct dwc3_request *tmp; 2961 + struct list_head local; 2979 2962 2980 - list_for_each_entry_safe(req, tmp, &dep->started_list, list) { 2963 + restart: 2964 + list_replace_init(&dep->started_list, &local); 2965 + 2966 + list_for_each_entry_safe(req, tmp, &local, list) { 2981 2967 int ret; 2982 2968 2983 2969 ret = dwc3_gadget_ep_cleanup_completed_request(dep, event, ··· 2989 2967 if (ret) 2990 2968 break; 2991 2969 } 2970 + 2971 + if (!list_empty(&dep->started_list)) 2972 + goto restart; 2992 2973 } 2993 2974 2994 2975 static bool dwc3_gadget_ep_should_continue(struct dwc3_ep *dep)
+39 -7
drivers/usb/gadget/function/f_hid.c
··· 41 41 unsigned char bInterfaceSubClass; 42 42 unsigned char bInterfaceProtocol; 43 43 unsigned char protocol; 44 + unsigned char idle; 44 45 unsigned short report_desc_length; 45 46 char *report_desc; 46 47 unsigned short report_length; ··· 339 338 340 339 spin_lock_irqsave(&hidg->write_spinlock, flags); 341 340 341 + if (!hidg->req) { 342 + spin_unlock_irqrestore(&hidg->write_spinlock, flags); 343 + return -ESHUTDOWN; 344 + } 345 + 342 346 #define WRITE_COND (!hidg->write_pending) 343 347 try_again: 344 348 /* write queue */ ··· 364 358 count = min_t(unsigned, count, hidg->report_length); 365 359 366 360 spin_unlock_irqrestore(&hidg->write_spinlock, flags); 367 - status = copy_from_user(req->buf, buffer, count); 368 361 362 + if (!req) { 363 + ERROR(hidg->func.config->cdev, "hidg->req is NULL\n"); 364 + status = -ESHUTDOWN; 365 + goto release_write_pending; 366 + } 367 + 368 + status = copy_from_user(req->buf, buffer, count); 369 369 if (status != 0) { 370 370 ERROR(hidg->func.config->cdev, 371 371 "copy_from_user error\n"); ··· 399 387 400 388 spin_unlock_irqrestore(&hidg->write_spinlock, flags); 401 389 402 - status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC); 403 - if (status < 0) { 404 - ERROR(hidg->func.config->cdev, 405 - "usb_ep_queue error on int endpoint %zd\n", status); 390 + if (!hidg->in_ep->enabled) { 391 + ERROR(hidg->func.config->cdev, "in_ep is disabled\n"); 392 + status = -ESHUTDOWN; 406 393 goto release_write_pending; 407 - } else { 408 - status = count; 409 394 } 395 + 396 + status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC); 397 + if (status < 0) 398 + goto release_write_pending; 399 + else 400 + status = count; 410 401 411 402 return status; 412 403 release_write_pending: ··· 538 523 goto respond; 539 524 break; 540 525 526 + case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 527 + | HID_REQ_GET_IDLE): 528 + VDBG(cdev, "get_idle\n"); 529 + length = min_t(unsigned int, length, 1); 530 + ((u8 *) req->buf)[0] = hidg->idle; 531 + goto respond; 532 + break; 533 + 541 534 case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 542 535 | HID_REQ_SET_REPORT): 543 536 VDBG(cdev, "set_report | wLength=%d\n", ctrl->wLength); ··· 567 544 goto respond; 568 545 } 569 546 goto stall; 547 + break; 548 + 549 + case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 550 + | HID_REQ_SET_IDLE): 551 + VDBG(cdev, "set_idle\n"); 552 + length = 0; 553 + hidg->idle = value >> 8; 554 + goto respond; 570 555 break; 571 556 572 557 case ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8 ··· 804 773 hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass; 805 774 hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol; 806 775 hidg->protocol = HID_REPORT_PROTOCOL; 776 + hidg->idle = 1; 807 777 hidg_ss_in_ep_desc.wMaxPacketSize = cpu_to_le16(hidg->report_length); 808 778 hidg_ss_in_comp_desc.wBytesPerInterval = 809 779 cpu_to_le16(hidg->report_length);
+10 -4
drivers/usb/gadget/udc/max3420_udc.c
··· 1255 1255 err = devm_request_irq(&spi->dev, irq, max3420_irq_handler, 0, 1256 1256 "max3420", udc); 1257 1257 if (err < 0) 1258 - return err; 1258 + goto del_gadget; 1259 1259 1260 1260 udc->thread_task = kthread_create(max3420_thread, udc, 1261 1261 "max3420-thread"); 1262 - if (IS_ERR(udc->thread_task)) 1263 - return PTR_ERR(udc->thread_task); 1262 + if (IS_ERR(udc->thread_task)) { 1263 + err = PTR_ERR(udc->thread_task); 1264 + goto del_gadget; 1265 + } 1264 1266 1265 1267 irq = of_irq_get_byname(spi->dev.of_node, "vbus"); 1266 1268 if (irq <= 0) { /* no vbus irq implies self-powered design */ ··· 1282 1280 err = devm_request_irq(&spi->dev, irq, 1283 1281 max3420_vbus_handler, 0, "vbus", udc); 1284 1282 if (err < 0) 1285 - return err; 1283 + goto del_gadget; 1286 1284 } 1287 1285 1288 1286 return 0; 1287 + 1288 + del_gadget: 1289 + usb_del_gadget_udc(&udc->gadget); 1290 + return err; 1289 1291 } 1290 1292 1291 1293 static int max3420_remove(struct spi_device *spi)
+5 -4
drivers/usb/host/ohci-at91.c
··· 611 611 if (ohci_at91->wakeup) 612 612 enable_irq_wake(hcd->irq); 613 613 614 - ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); 615 - 616 614 ret = ohci_suspend(hcd, ohci_at91->wakeup); 617 615 if (ret) { 618 616 if (ohci_at91->wakeup) ··· 630 632 /* flush the writes */ 631 633 (void) ohci_readl (ohci, &ohci->regs->control); 632 634 msleep(1); 635 + ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); 633 636 at91_stop_clock(ohci_at91); 637 + } else { 638 + ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); 634 639 } 635 640 636 641 return ret; ··· 645 644 struct usb_hcd *hcd = dev_get_drvdata(dev); 646 645 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); 647 646 647 + ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0); 648 + 648 649 if (ohci_at91->wakeup) 649 650 disable_irq_wake(hcd->irq); 650 651 else 651 652 at91_start_clock(ohci_at91); 652 653 653 654 ohci_resume(hcd, false); 654 - 655 - ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0); 656 655 657 656 return 0; 658 657 }
+38 -5
drivers/usb/musb/omap2430.c
··· 35 35 struct device *control_otghs; 36 36 unsigned int is_runtime_suspended:1; 37 37 unsigned int needs_resume:1; 38 + unsigned int phy_suspended:1; 38 39 }; 39 40 #define glue_to_musb(g) platform_get_drvdata(g->musb) 40 41 ··· 459 458 460 459 omap2430_low_level_exit(musb); 461 460 462 - phy_power_off(musb->phy); 463 - phy_exit(musb->phy); 461 + if (!glue->phy_suspended) { 462 + phy_power_off(musb->phy); 463 + phy_exit(musb->phy); 464 + } 464 465 465 466 glue->is_runtime_suspended = 1; 466 467 ··· 477 474 if (!musb) 478 475 return 0; 479 476 480 - phy_init(musb->phy); 481 - phy_power_on(musb->phy); 477 + if (!glue->phy_suspended) { 478 + phy_init(musb->phy); 479 + phy_power_on(musb->phy); 480 + } 482 481 483 482 omap2430_low_level_init(musb); 484 483 musb_writel(musb->mregs, OTG_INTERFSEL, ··· 494 489 return 0; 495 490 } 496 491 492 + /* I2C and SPI PHYs need to be suspended before the glue layer */ 497 493 static int omap2430_suspend(struct device *dev) 494 + { 495 + struct omap2430_glue *glue = dev_get_drvdata(dev); 496 + struct musb *musb = glue_to_musb(glue); 497 + 498 + phy_power_off(musb->phy); 499 + phy_exit(musb->phy); 500 + glue->phy_suspended = 1; 501 + 502 + return 0; 503 + } 504 + 505 + /* Glue layer needs to be suspended after musb_suspend() */ 506 + static int omap2430_suspend_late(struct device *dev) 498 507 { 499 508 struct omap2430_glue *glue = dev_get_drvdata(dev); 500 509 ··· 520 501 return omap2430_runtime_suspend(dev); 521 502 } 522 503 523 - static int omap2430_resume(struct device *dev) 504 + static int omap2430_resume_early(struct device *dev) 524 505 { 525 506 struct omap2430_glue *glue = dev_get_drvdata(dev); 526 507 ··· 532 513 return omap2430_runtime_resume(dev); 533 514 } 534 515 516 + static int omap2430_resume(struct device *dev) 517 + { 518 + struct omap2430_glue *glue = dev_get_drvdata(dev); 519 + struct musb *musb = glue_to_musb(glue); 520 + 521 + phy_init(musb->phy); 522 + phy_power_on(musb->phy); 523 + glue->phy_suspended = 0; 524 + 525 + return 0; 526 + } 527 + 535 528 static const struct dev_pm_ops omap2430_pm_ops = { 536 529 .runtime_suspend = omap2430_runtime_suspend, 537 530 .runtime_resume = omap2430_runtime_resume, 538 531 .suspend = omap2430_suspend, 532 + .suspend_late = omap2430_suspend_late, 533 + .resume_early = omap2430_resume_early, 539 534 .resume = omap2430_resume, 540 535 }; 541 536
+1
drivers/usb/serial/ch341.c
··· 851 851 .owner = THIS_MODULE, 852 852 .name = "ch341-uart", 853 853 }, 854 + .bulk_in_size = 512, 854 855 .id_table = id_table, 855 856 .num_ports = 1, 856 857 .open = ch341_open,
+1
drivers/usb/serial/ftdi_sio.c
··· 219 219 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, 220 220 { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, 221 221 { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, 222 + { USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) }, 222 223 { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, 223 224 { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, 224 225 { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
+3
drivers/usb/serial/ftdi_sio_ids.h
··· 159 159 /* Vardaan Enterprises Serial Interface VEUSB422R3 */ 160 160 #define FTDI_VARDAAN_PID 0xF070 161 161 162 + /* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */ 163 + #define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50 164 + 162 165 /* 163 166 * Xsens Technologies BV products (http://www.xsens.com). 164 167 */
+2
drivers/usb/serial/option.c
··· 1203 1203 .driver_info = NCTRL(2) | RSVD(3) }, 1204 1204 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */ 1205 1205 .driver_info = NCTRL(0) | RSVD(1) }, 1206 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ 1207 + .driver_info = NCTRL(2) | RSVD(3) }, 1206 1208 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), 1207 1209 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, 1208 1210 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
+26 -16
drivers/usb/serial/pl2303.c
··· 418 418 bcdDevice = le16_to_cpu(desc->bcdDevice); 419 419 bcdUSB = le16_to_cpu(desc->bcdUSB); 420 420 421 - switch (bcdDevice) { 422 - case 0x100: 423 - /* 424 - * Assume it's an HXN-type if the device doesn't support the old read 425 - * request value. 426 - */ 427 - if (bcdUSB == 0x200 && !pl2303_supports_hx_status(serial)) 428 - return TYPE_HXN; 421 + switch (bcdUSB) { 422 + case 0x110: 423 + switch (bcdDevice) { 424 + case 0x300: 425 + return TYPE_HX; 426 + case 0x400: 427 + return TYPE_HXD; 428 + default: 429 + return TYPE_HX; 430 + } 429 431 break; 430 - case 0x300: 431 - if (bcdUSB == 0x200) 432 + case 0x200: 433 + switch (bcdDevice) { 434 + case 0x100: 435 + case 0x305: 436 + /* 437 + * Assume it's an HXN-type if the device doesn't 438 + * support the old read request value. 439 + */ 440 + if (!pl2303_supports_hx_status(serial)) 441 + return TYPE_HXN; 442 + break; 443 + case 0x300: 432 444 return TYPE_TA; 433 - 434 - return TYPE_HX; 435 - case 0x400: 436 - return TYPE_HXD; 437 - case 0x500: 438 - return TYPE_TB; 445 + case 0x500: 446 + return TYPE_TB; 447 + } 448 + break; 439 449 } 440 450 441 451 dev_err(&serial->interface->dev,
+2 -2
drivers/usb/typec/tcpm/tcpm.c
··· 5369 5369 void tcpm_sink_frs(struct tcpm_port *port) 5370 5370 { 5371 5371 spin_lock(&port->pd_event_lock); 5372 - port->pd_events = TCPM_FRS_EVENT; 5372 + port->pd_events |= TCPM_FRS_EVENT; 5373 5373 spin_unlock(&port->pd_event_lock); 5374 5374 kthread_queue_work(port->wq, &port->event_work); 5375 5375 } ··· 5378 5378 void tcpm_sourcing_vbus(struct tcpm_port *port) 5379 5379 { 5380 5380 spin_lock(&port->pd_event_lock); 5381 - port->pd_events = TCPM_SOURCING_VBUS; 5381 + port->pd_events |= TCPM_SOURCING_VBUS; 5382 5382 spin_unlock(&port->pd_event_lock); 5383 5383 kthread_queue_work(port->wq, &port->event_work); 5384 5384 }
+1
include/linux/usb/otg-fsm.h
··· 196 196 struct mutex lock; 197 197 u8 *host_req_flag; 198 198 struct delayed_work hnp_polling_work; 199 + bool hnp_work_inited; 199 200 bool state_changed; 200 201 }; 201 202