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

Pull USB fixes from Greg KH:
"Here are some small USB driver fixes, and new device ids, for
6.14-rc3. Lots of tiny stuff for reported problems, including:

- new device ids and quirks

- usb hub crash fix found by syzbot

- dwc2 driver fix

- dwc3 driver fixes

- uvc gadget driver fix

- cdc-acm driver fixes for a variety of different issues

- other tiny bugfixes

Almost all of these have been in linux-next this week, and all have
passed 0-day testing"

* tag 'usb-6.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits)
usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY
usb: roles: set switch registered flag early on
usb: gadget: uvc: Fix unstarted kthread worker
USB: quirks: add USB_QUIRK_NO_LPM quirk for Teclast dist
usb: gadget: core: flush gadget workqueue after device removal
USB: gadget: f_midi: f_midi_complete to call queue_work
usb: core: fix pipe creation for get_bMaxPacketSize0
usb: dwc3: Fix timeout issue during controller enter/exit from halt state
USB: Add USB_QUIRK_NO_LPM quirk for sony xperia xz1 smartphone
USB: cdc-acm: Fill in Renesas R-Car D3 USB Download mode quirk
usb: cdc-acm: Fix handling of oversized fragments
usb: cdc-acm: Check control transfer buffer size before access
usb: xhci: Restore xhci_pci support for Renesas HCs
USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI
USB: serial: option: drop MeiG Smart defines
USB: serial: option: fix Telit Cinterion FN990A name
USB: serial: option: add Telit Cinterion FN990B compositions
USB: serial: option: add MeiG Smart SLM828
usb: gadget: f_midi: fix MIDI Streaming descriptor lengths
usb: dwc2: gadget: remove of_node reference upon udc_stop
...

+139 -45
+21 -7
drivers/usb/class/cdc-acm.c
··· 371 371 static void acm_ctrl_irq(struct urb *urb) 372 372 { 373 373 struct acm *acm = urb->context; 374 - struct usb_cdc_notification *dr = urb->transfer_buffer; 374 + struct usb_cdc_notification *dr; 375 375 unsigned int current_size = urb->actual_length; 376 376 unsigned int expected_size, copy_size, alloc_size; 377 377 int retval; ··· 398 398 399 399 usb_mark_last_busy(acm->dev); 400 400 401 - if (acm->nb_index) 401 + if (acm->nb_index == 0) { 402 + /* 403 + * The first chunk of a message must contain at least the 404 + * notification header with the length field, otherwise we 405 + * can't get an expected_size. 406 + */ 407 + if (current_size < sizeof(struct usb_cdc_notification)) { 408 + dev_dbg(&acm->control->dev, "urb too short\n"); 409 + goto exit; 410 + } 411 + dr = urb->transfer_buffer; 412 + } else { 402 413 dr = (struct usb_cdc_notification *)acm->notification_buffer; 403 - 414 + } 404 415 /* size = notification-header + (optional) data */ 405 416 expected_size = sizeof(struct usb_cdc_notification) + 406 417 le16_to_cpu(dr->wLength); 407 418 408 - if (current_size < expected_size) { 419 + if (acm->nb_index != 0 || current_size < expected_size) { 409 420 /* notification is transmitted fragmented, reassemble */ 410 421 if (acm->nb_size < expected_size) { 411 422 u8 *new_buffer; ··· 1738 1727 { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */ 1739 1728 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ 1740 1729 }, 1741 - { USB_DEVICE(0x045b, 0x023c), /* Renesas USB Download mode */ 1730 + { USB_DEVICE(0x045b, 0x023c), /* Renesas R-Car H3 USB Download mode */ 1742 1731 .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1743 1732 }, 1744 - { USB_DEVICE(0x045b, 0x0248), /* Renesas USB Download mode */ 1733 + { USB_DEVICE(0x045b, 0x0247), /* Renesas R-Car D3 USB Download mode */ 1745 1734 .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1746 1735 }, 1747 - { USB_DEVICE(0x045b, 0x024D), /* Renesas USB Download mode */ 1736 + { USB_DEVICE(0x045b, 0x0248), /* Renesas R-Car M3-N USB Download mode */ 1737 + .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1738 + }, 1739 + { USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */ 1748 1740 .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1749 1741 }, 1750 1742 { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */
+12 -2
drivers/usb/core/hub.c
··· 1849 1849 hdev = interface_to_usbdev(intf); 1850 1850 1851 1851 /* 1852 + * The USB 2.0 spec prohibits hubs from having more than one 1853 + * configuration or interface, and we rely on this prohibition. 1854 + * Refuse to accept a device that violates it. 1855 + */ 1856 + if (hdev->descriptor.bNumConfigurations > 1 || 1857 + hdev->actconfig->desc.bNumInterfaces > 1) { 1858 + dev_err(&intf->dev, "Invalid hub with more than one config or interface\n"); 1859 + return -EINVAL; 1860 + } 1861 + 1862 + /* 1852 1863 * Set default autosuspend delay as 0 to speedup bus suspend, 1853 1864 * based on the below considerations: 1854 1865 * ··· 4709 4698 EXPORT_SYMBOL_GPL(usb_ep0_reinit); 4710 4699 4711 4700 #define usb_sndaddr0pipe() (PIPE_CONTROL << 30) 4712 - #define usb_rcvaddr0pipe() ((PIPE_CONTROL << 30) | USB_DIR_IN) 4713 4701 4714 4702 static int hub_set_address(struct usb_device *udev, int devnum) 4715 4703 { ··· 4814 4804 for (i = 0; i < GET_MAXPACKET0_TRIES; ++i) { 4815 4805 /* Start with invalid values in case the transfer fails */ 4816 4806 buf->bDescriptorType = buf->bMaxPacketSize0 = 0; 4817 - rc = usb_control_msg(udev, usb_rcvaddr0pipe(), 4807 + rc = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 4818 4808 USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, 4819 4809 USB_DT_DEVICE << 8, 0, 4820 4810 buf, size,
+6
drivers/usb/core/quirks.c
··· 435 435 { USB_DEVICE(0x0c45, 0x7056), .driver_info = 436 436 USB_QUIRK_IGNORE_REMOTE_WAKEUP }, 437 437 438 + /* Sony Xperia XZ1 Compact (lilac) smartphone in fastboot mode */ 439 + { USB_DEVICE(0x0fce, 0x0dde), .driver_info = USB_QUIRK_NO_LPM }, 440 + 438 441 /* Action Semiconductor flash disk */ 439 442 { USB_DEVICE(0x10d6, 0x2200), .driver_info = 440 443 USB_QUIRK_STRING_FETCH_255 }, ··· 527 524 528 525 /* Blackmagic Design UltraStudio SDI */ 529 526 { USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM }, 527 + 528 + /* Teclast disk */ 529 + { USB_DEVICE(0x1f75, 0x0917), .driver_info = USB_QUIRK_NO_LPM }, 530 530 531 531 /* Hauppauge HVR-950q */ 532 532 { USB_DEVICE(0x2040, 0x7200), .driver_info =
+1
drivers/usb/dwc2/gadget.c
··· 4615 4615 spin_lock_irqsave(&hsotg->lock, flags); 4616 4616 4617 4617 hsotg->driver = NULL; 4618 + hsotg->gadget.dev.of_node = NULL; 4618 4619 hsotg->gadget.speed = USB_SPEED_UNKNOWN; 4619 4620 hsotg->enabled = 0; 4620 4621
+1
drivers/usb/dwc3/core.h
··· 717 717 /** 718 718 * struct dwc3_ep - device side endpoint representation 719 719 * @endpoint: usb endpoint 720 + * @nostream_work: work for handling bulk NoStream 720 721 * @cancelled_list: list of cancelled requests for this endpoint 721 722 * @pending_list: list of pending requests for this endpoint 722 723 * @started_list: list of started requests on this endpoint
+34
drivers/usb/dwc3/gadget.c
··· 2629 2629 { 2630 2630 u32 reg; 2631 2631 u32 timeout = 2000; 2632 + u32 saved_config = 0; 2632 2633 2633 2634 if (pm_runtime_suspended(dwc->dev)) 2634 2635 return 0; 2636 + 2637 + /* 2638 + * When operating in USB 2.0 speeds (HS/FS), ensure that 2639 + * GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY are cleared before starting 2640 + * or stopping the controller. This resolves timeout issues that occur 2641 + * during frequent role switches between host and device modes. 2642 + * 2643 + * Save and clear these settings, then restore them after completing the 2644 + * controller start or stop sequence. 2645 + * 2646 + * This solution was discovered through experimentation as it is not 2647 + * mentioned in the dwc3 programming guide. It has been tested on an 2648 + * Exynos platforms. 2649 + */ 2650 + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); 2651 + if (reg & DWC3_GUSB2PHYCFG_SUSPHY) { 2652 + saved_config |= DWC3_GUSB2PHYCFG_SUSPHY; 2653 + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; 2654 + } 2655 + 2656 + if (reg & DWC3_GUSB2PHYCFG_ENBLSLPM) { 2657 + saved_config |= DWC3_GUSB2PHYCFG_ENBLSLPM; 2658 + reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; 2659 + } 2660 + 2661 + if (saved_config) 2662 + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); 2635 2663 2636 2664 reg = dwc3_readl(dwc->regs, DWC3_DCTL); 2637 2665 if (is_on) { ··· 2687 2659 reg = dwc3_readl(dwc->regs, DWC3_DSTS); 2688 2660 reg &= DWC3_DSTS_DEVCTRLHLT; 2689 2661 } while (--timeout && !(!is_on ^ !reg)); 2662 + 2663 + if (saved_config) { 2664 + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); 2665 + reg |= saved_config; 2666 + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); 2667 + } 2690 2668 2691 2669 if (!timeout) 2692 2670 return -ETIMEDOUT;
+14 -5
drivers/usb/gadget/function/f_midi.c
··· 283 283 /* Our transmit completed. See if there's more to go. 284 284 * f_midi_transmit eats req, don't queue it again. */ 285 285 req->length = 0; 286 - f_midi_transmit(midi); 286 + queue_work(system_highpri_wq, &midi->work); 287 287 return; 288 288 } 289 289 break; ··· 907 907 908 908 status = -ENODEV; 909 909 910 + /* 911 + * Reset wMaxPacketSize with maximum packet size of FS bulk transfer before 912 + * endpoint claim. This ensures that the wMaxPacketSize does not exceed the 913 + * limit during bind retries where configured dwc3 TX/RX FIFO's maxpacket 914 + * size of 512 bytes for IN/OUT endpoints in support HS speed only. 915 + */ 916 + bulk_in_desc.wMaxPacketSize = cpu_to_le16(64); 917 + bulk_out_desc.wMaxPacketSize = cpu_to_le16(64); 918 + 910 919 /* allocate instance-specific endpoints */ 911 920 midi->in_ep = usb_ep_autoconfig(cdev->gadget, &bulk_in_desc); 912 921 if (!midi->in_ep) ··· 1009 1000 } 1010 1001 1011 1002 /* configure the endpoint descriptors ... */ 1012 - ms_out_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->in_ports); 1013 - ms_out_desc.bNumEmbMIDIJack = midi->in_ports; 1003 + ms_out_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->out_ports); 1004 + ms_out_desc.bNumEmbMIDIJack = midi->out_ports; 1014 1005 1015 - ms_in_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->out_ports); 1016 - ms_in_desc.bNumEmbMIDIJack = midi->out_ports; 1006 + ms_in_desc.bLength = USB_DT_MS_ENDPOINT_SIZE(midi->in_ports); 1007 + ms_in_desc.bNumEmbMIDIJack = midi->in_ports; 1017 1008 1018 1009 /* ... and add them to the list */ 1019 1010 endpoint_descriptor_index = i;
+1 -1
drivers/usb/gadget/function/uvc_video.c
··· 818 818 return -EINVAL; 819 819 820 820 /* Allocate a kthread for asynchronous hw submit handler. */ 821 - video->kworker = kthread_create_worker(0, "UVCG"); 821 + video->kworker = kthread_run_worker(0, "UVCG"); 822 822 if (IS_ERR(video->kworker)) { 823 823 uvcg_err(&video->uvc->func, "failed to create UVCG kworker\n"); 824 824 return PTR_ERR(video->kworker);
+1 -1
drivers/usb/gadget/udc/core.c
··· 1543 1543 1544 1544 kobject_uevent(&udc->dev.kobj, KOBJ_REMOVE); 1545 1545 sysfs_remove_link(&udc->dev.kobj, "gadget"); 1546 - flush_work(&gadget->work); 1547 1546 device_del(&gadget->dev); 1547 + flush_work(&gadget->work); 1548 1548 ida_free(&gadget_id_numbers, gadget->id_number); 1549 1549 cancel_work_sync(&udc->vbus_work); 1550 1550 device_unregister(&udc->dev);
+1 -1
drivers/usb/gadget/udc/renesas_usb3.c
··· 310 310 struct list_head queue; 311 311 }; 312 312 313 - #define USB3_EP_NAME_SIZE 8 313 + #define USB3_EP_NAME_SIZE 16 314 314 struct renesas_usb3_ep { 315 315 struct usb_ep ep; 316 316 struct renesas_usb3 *usb3;
+9
drivers/usb/host/pci-quirks.c
··· 958 958 * booting from USB disk or using a usb keyboard 959 959 */ 960 960 hcc_params = readl(base + EHCI_HCC_PARAMS); 961 + 962 + /* LS7A EHCI controller doesn't have extended capabilities, the 963 + * EECP (EHCI Extended Capabilities Pointer) field of HCCPARAMS 964 + * register should be 0x0 but it reads as 0xa0. So clear it to 965 + * avoid error messages on boot. 966 + */ 967 + if (pdev->vendor == PCI_VENDOR_ID_LOONGSON && pdev->device == 0x7a14) 968 + hcc_params &= ~(0xffL << 8); 969 + 961 970 offset = (hcc_params >> 8) & 0xff; 962 971 while (offset && --count) { 963 972 pci_read_config_dword(pdev, offset, &cap);
+4 -3
drivers/usb/host/xhci-pci.c
··· 653 653 } 654 654 EXPORT_SYMBOL_NS_GPL(xhci_pci_common_probe, "xhci"); 655 655 656 - static const struct pci_device_id pci_ids_reject[] = { 657 - /* handled by xhci-pci-renesas */ 656 + /* handled by xhci-pci-renesas if enabled */ 657 + static const struct pci_device_id pci_ids_renesas[] = { 658 658 { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0014) }, 659 659 { PCI_DEVICE(PCI_VENDOR_ID_RENESAS, 0x0015) }, 660 660 { /* end: all zeroes */ } ··· 662 662 663 663 static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 664 664 { 665 - if (pci_match_id(pci_ids_reject, dev)) 665 + if (IS_ENABLED(CONFIG_USB_XHCI_PCI_RENESAS) && 666 + pci_match_id(pci_ids_renesas, dev)) 666 667 return -ENODEV; 667 668 668 669 return xhci_pci_common_probe(dev, id);
+1 -1
drivers/usb/phy/phy-generic.c
··· 212 212 if (of_property_read_u32(node, "clock-frequency", &clk_rate)) 213 213 clk_rate = 0; 214 214 215 - needs_clk = of_property_read_bool(node, "clocks"); 215 + needs_clk = of_property_present(node, "clocks"); 216 216 } 217 217 nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset", 218 218 GPIOD_ASIS);
+3 -2
drivers/usb/roles/class.c
··· 387 387 dev_set_name(&sw->dev, "%s-role-switch", 388 388 desc->name ? desc->name : dev_name(parent)); 389 389 390 + sw->registered = true; 391 + 390 392 ret = device_register(&sw->dev); 391 393 if (ret) { 394 + sw->registered = false; 392 395 put_device(&sw->dev); 393 396 return ERR_PTR(ret); 394 397 } ··· 401 398 if (ret) 402 399 dev_warn(&sw->dev, "failed to add component\n"); 403 400 } 404 - 405 - sw->registered = true; 406 401 407 402 /* TODO: Symlinks for the host port and the device controller. */ 408 403
+29 -20
drivers/usb/serial/option.c
··· 619 619 /* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */ 620 620 #define LUAT_PRODUCT_AIR720U 0x4e00 621 621 622 - /* MeiG Smart Technology products */ 623 - #define MEIGSMART_VENDOR_ID 0x2dee 624 - /* MeiG Smart SRM815/SRM825L based on Qualcomm 315 */ 625 - #define MEIGSMART_PRODUCT_SRM825L 0x4d22 626 - /* MeiG Smart SLM320 based on UNISOC UIS8910 */ 627 - #define MEIGSMART_PRODUCT_SLM320 0x4d41 628 - /* MeiG Smart SLM770A based on ASR1803 */ 629 - #define MEIGSMART_PRODUCT_SLM770A 0x4d57 630 - 631 622 /* Device flags */ 632 623 633 624 /* Highest interface number which can be used with NCTRL() and RSVD() */ ··· 1358 1367 .driver_info = NCTRL(2) | RSVD(3) }, 1359 1368 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ 1360 1369 .driver_info = NCTRL(0) | RSVD(1) }, 1361 - { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990 (rmnet) */ 1370 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990A (rmnet) */ 1362 1371 .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, 1363 - { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990 (MBIM) */ 1372 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990A (MBIM) */ 1364 1373 .driver_info = NCTRL(0) | RSVD(1) }, 1365 - { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990 (RNDIS) */ 1374 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990A (RNDIS) */ 1366 1375 .driver_info = NCTRL(2) | RSVD(3) }, 1367 - { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */ 1376 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990A (ECM) */ 1368 1377 .driver_info = NCTRL(0) | RSVD(1) }, 1369 - { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990 (PCIe) */ 1378 + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ 1370 1379 .driver_info = RSVD(0) }, 1371 1380 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990 (rmnet) */ 1372 1381 .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, ··· 1394 1403 .driver_info = RSVD(0) | NCTRL(3) }, 1395 1404 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c8, 0xff), /* Telit FE910C04 (rmnet) */ 1396 1405 .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, 1406 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x60) }, /* Telit FN990B (rmnet) */ 1407 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x40) }, 1408 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d0, 0x30), 1409 + .driver_info = NCTRL(5) }, 1410 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x60) }, /* Telit FN990B (MBIM) */ 1411 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x40) }, 1412 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d1, 0x30), 1413 + .driver_info = NCTRL(6) }, 1414 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x60) }, /* Telit FN990B (RNDIS) */ 1415 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x40) }, 1416 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d2, 0x30), 1417 + .driver_info = NCTRL(6) }, 1418 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x60) }, /* Telit FN990B (ECM) */ 1419 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x40) }, 1420 + { USB_DEVICE_INTERFACE_PROTOCOL(TELIT_VENDOR_ID, 0x10d3, 0x30), 1421 + .driver_info = NCTRL(6) }, 1397 1422 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), 1398 1423 .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, 1399 1424 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), ··· 2354 2347 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a05, 0xff) }, /* Fibocom FM650-CN (NCM mode) */ 2355 2348 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a06, 0xff) }, /* Fibocom FM650-CN (RNDIS mode) */ 2356 2349 { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0a07, 0xff) }, /* Fibocom FM650-CN (MBIM mode) */ 2350 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d41, 0xff, 0, 0) }, /* MeiG Smart SLM320 */ 2351 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d57, 0xff, 0, 0) }, /* MeiG Smart SLM770A */ 2352 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0, 0) }, /* MeiG Smart SRM815 */ 2353 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0x10, 0x02) }, /* MeiG Smart SLM828 */ 2354 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0x10, 0x03) }, /* MeiG Smart SLM828 */ 2355 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x30) }, /* MeiG Smart SRM815 and SRM825L */ 2356 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x40) }, /* MeiG Smart SRM825L */ 2357 + { USB_DEVICE_AND_INTERFACE_INFO(0x2dee, 0x4d22, 0xff, 0xff, 0x60) }, /* MeiG Smart SRM825L */ 2357 2358 { USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */ 2358 2359 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ 2359 2360 { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ ··· 2418 2403 { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, 2419 2404 { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, 2420 2405 { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, 2421 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) }, 2422 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM770A, 0xff, 0, 0) }, 2423 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0, 0) }, 2424 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) }, 2425 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) }, 2426 - { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) }, 2427 2406 { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */ 2428 2407 .driver_info = NCTRL(1) }, 2429 2408 { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */
+1 -2
drivers/usb/typec/tcpm/tcpm.c
··· 5591 5591 tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_USB, 5592 5592 port->pps_data.active, 0); 5593 5593 tcpm_set_charge(port, false); 5594 - tcpm_set_state(port, hard_reset_state(port), 5595 - port->timings.ps_src_off_time); 5594 + tcpm_set_state(port, ERROR_RECOVERY, port->timings.ps_src_off_time); 5596 5595 break; 5597 5596 case PR_SWAP_SNK_SRC_SOURCE_ON: 5598 5597 tcpm_enable_auto_vbus_discharge(port, true);