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

Pull USB / Thunderbolt fixes from Greg KH:
"Here are some USB and Thunderbolt driver fixes for reported problems
for 6.16-rc6. Included in here are:

- Thunderbolt fixes for some much-reported issues

- dwc2 driver fixes

- dwc3 driver fixes

- new usb-serial driver device ids

- gadgetfs configfs fix

- musb driver fix

- USB hub driver fix

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

* tag 'usb-6.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: hub: Don't try to recover devices lost during warm reset.
usb: dwc2: gadget: Fix enter to hibernation for UTMI+ PHY
usb: dwc3: qcom: Don't leave BCR asserted
USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition
USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI
usb: gadget: configfs: Fix OOB read on empty string write
usb: musb: fix gadget state on disconnect
USB: serial: option: add Foxconn T99W640
thunderbolt: Fix bit masking in tb_dp_port_set_hops()
thunderbolt: Fix wake on connect at runtime

+62 -33
+5 -5
drivers/thunderbolt/switch.c
··· 1450 1450 return ret; 1451 1451 1452 1452 data[0] &= ~ADP_DP_CS_0_VIDEO_HOPID_MASK; 1453 - data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; 1453 + data[1] &= ~ADP_DP_CS_1_AUX_TX_HOPID_MASK; 1454 1454 data[1] &= ~ADP_DP_CS_1_AUX_RX_HOPID_MASK; 1455 1455 1456 1456 data[0] |= (video << ADP_DP_CS_0_VIDEO_HOPID_SHIFT) & ··· 3437 3437 } 3438 3438 } 3439 3439 3440 - static int tb_switch_set_wake(struct tb_switch *sw, unsigned int flags) 3440 + static int tb_switch_set_wake(struct tb_switch *sw, unsigned int flags, bool runtime) 3441 3441 { 3442 3442 if (flags) 3443 3443 tb_sw_dbg(sw, "enabling wakeup: %#x\n", flags); ··· 3445 3445 tb_sw_dbg(sw, "disabling wakeup\n"); 3446 3446 3447 3447 if (tb_switch_is_usb4(sw)) 3448 - return usb4_switch_set_wake(sw, flags); 3448 + return usb4_switch_set_wake(sw, flags, runtime); 3449 3449 return tb_lc_set_wake(sw, flags); 3450 3450 } 3451 3451 ··· 3521 3521 tb_switch_check_wakes(sw); 3522 3522 3523 3523 /* Disable wakes */ 3524 - tb_switch_set_wake(sw, 0); 3524 + tb_switch_set_wake(sw, 0, true); 3525 3525 3526 3526 err = tb_switch_tmu_init(sw); 3527 3527 if (err) ··· 3603 3603 flags |= TB_WAKE_ON_USB4 | TB_WAKE_ON_USB3 | TB_WAKE_ON_PCIE; 3604 3604 } 3605 3605 3606 - tb_switch_set_wake(sw, flags); 3606 + tb_switch_set_wake(sw, flags, runtime); 3607 3607 3608 3608 if (tb_switch_is_usb4(sw)) 3609 3609 usb4_switch_set_sleep(sw);
+1 -1
drivers/thunderbolt/tb.h
··· 1317 1317 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf, 1318 1318 size_t size); 1319 1319 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw); 1320 - int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags); 1320 + int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags, bool runtime); 1321 1321 int usb4_switch_set_sleep(struct tb_switch *sw); 1322 1322 int usb4_switch_nvm_sector_size(struct tb_switch *sw); 1323 1323 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
+5 -7
drivers/thunderbolt/usb4.c
··· 403 403 * usb4_switch_set_wake() - Enabled/disable wake 404 404 * @sw: USB4 router 405 405 * @flags: Wakeup flags (%0 to disable) 406 + * @runtime: Wake is being programmed during system runtime 406 407 * 407 408 * Enables/disables router to wake up from sleep. 408 409 */ 409 - int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags) 410 + int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags, bool runtime) 410 411 { 411 - struct usb4_port *usb4; 412 412 struct tb_port *port; 413 413 u64 route = tb_route(sw); 414 414 u32 val; ··· 438 438 val |= PORT_CS_19_WOU4; 439 439 } else { 440 440 bool configured = val & PORT_CS_19_PC; 441 - usb4 = port->usb4; 441 + bool wakeup = runtime || device_may_wakeup(&port->usb4->dev); 442 442 443 - if (((flags & TB_WAKE_ON_CONNECT) && 444 - device_may_wakeup(&usb4->dev)) && !configured) 443 + if ((flags & TB_WAKE_ON_CONNECT) && wakeup && !configured) 445 444 val |= PORT_CS_19_WOC; 446 - if (((flags & TB_WAKE_ON_DISCONNECT) && 447 - device_may_wakeup(&usb4->dev)) && configured) 445 + if ((flags & TB_WAKE_ON_DISCONNECT) && wakeup && configured) 448 446 val |= PORT_CS_19_WOD; 449 447 if ((flags & TB_WAKE_ON_USB4) && configured) 450 448 val |= PORT_CS_19_WOU4;
+6 -2
drivers/usb/core/hub.c
··· 5751 5751 struct usb_device *hdev = hub->hdev; 5752 5752 u16 portstatus, portchange; 5753 5753 int i = 0; 5754 + int err; 5754 5755 5755 5756 connect_change = test_bit(port1, hub->change_bits); 5756 5757 clear_bit(port1, hub->event_bits); ··· 5848 5847 } else if (!udev || !(portstatus & USB_PORT_STAT_CONNECTION) 5849 5848 || udev->state == USB_STATE_NOTATTACHED) { 5850 5849 dev_dbg(&port_dev->dev, "do warm reset, port only\n"); 5851 - if (hub_port_reset(hub, port1, NULL, 5852 - HUB_BH_RESET_TIME, true) < 0) 5850 + err = hub_port_reset(hub, port1, NULL, 5851 + HUB_BH_RESET_TIME, true); 5852 + if (!udev && err == -ENOTCONN) 5853 + connect_change = 0; 5854 + else if (err < 0) 5853 5855 hub_port_disable(hub, port1, 1); 5854 5856 } else { 5855 5857 dev_dbg(&port_dev->dev, "do warm reset, full device\n");
+27 -13
drivers/usb/dwc2/gadget.c
··· 5389 5389 if (gusbcfg & GUSBCFG_ULPI_UTMI_SEL) { 5390 5390 /* ULPI interface */ 5391 5391 gpwrdn |= GPWRDN_ULPI_LATCH_EN_DURING_HIB_ENTRY; 5392 + dwc2_writel(hsotg, gpwrdn, GPWRDN); 5393 + udelay(10); 5394 + 5395 + /* Suspend the Phy Clock */ 5396 + pcgcctl = dwc2_readl(hsotg, PCGCTL); 5397 + pcgcctl |= PCGCTL_STOPPCLK; 5398 + dwc2_writel(hsotg, pcgcctl, PCGCTL); 5399 + udelay(10); 5400 + 5401 + gpwrdn = dwc2_readl(hsotg, GPWRDN); 5402 + gpwrdn |= GPWRDN_PMUACTV; 5403 + dwc2_writel(hsotg, gpwrdn, GPWRDN); 5404 + udelay(10); 5405 + } else { 5406 + /* UTMI+ Interface */ 5407 + dwc2_writel(hsotg, gpwrdn, GPWRDN); 5408 + udelay(10); 5409 + 5410 + gpwrdn = dwc2_readl(hsotg, GPWRDN); 5411 + gpwrdn |= GPWRDN_PMUACTV; 5412 + dwc2_writel(hsotg, gpwrdn, GPWRDN); 5413 + udelay(10); 5414 + 5415 + pcgcctl = dwc2_readl(hsotg, PCGCTL); 5416 + pcgcctl |= PCGCTL_STOPPCLK; 5417 + dwc2_writel(hsotg, pcgcctl, PCGCTL); 5418 + udelay(10); 5392 5419 } 5393 - dwc2_writel(hsotg, gpwrdn, GPWRDN); 5394 - udelay(10); 5395 - 5396 - /* Suspend the Phy Clock */ 5397 - pcgcctl = dwc2_readl(hsotg, PCGCTL); 5398 - pcgcctl |= PCGCTL_STOPPCLK; 5399 - dwc2_writel(hsotg, pcgcctl, PCGCTL); 5400 - udelay(10); 5401 - 5402 - gpwrdn = dwc2_readl(hsotg, GPWRDN); 5403 - gpwrdn |= GPWRDN_PMUACTV; 5404 - dwc2_writel(hsotg, gpwrdn, GPWRDN); 5405 - udelay(10); 5406 5420 5407 5421 /* Set flag to indicate that we are in hibernation */ 5408 5422 hsotg->hibernated = 1;
+2 -5
drivers/usb/dwc3/dwc3-qcom.c
··· 680 680 ret = reset_control_deassert(qcom->resets); 681 681 if (ret) { 682 682 dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret); 683 - goto reset_assert; 683 + return ret; 684 684 } 685 685 686 686 ret = clk_bulk_prepare_enable(qcom->num_clocks, qcom->clks); 687 687 if (ret < 0) 688 - goto reset_assert; 688 + return ret; 689 689 690 690 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 691 691 if (!r) { ··· 755 755 dwc3_core_remove(&qcom->dwc); 756 756 clk_disable: 757 757 clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks); 758 - reset_assert: 759 - reset_control_assert(qcom->resets); 760 758 761 759 return ret; 762 760 } ··· 769 771 clk_bulk_disable_unprepare(qcom->num_clocks, qcom->clks); 770 772 771 773 dwc3_qcom_interconnect_exit(qcom); 772 - reset_control_assert(qcom->resets); 773 774 } 774 775 775 776 static int dwc3_qcom_pm_suspend(struct device *dev)
+4
drivers/usb/gadget/configfs.c
··· 1065 1065 unsigned int bytes_to_strip = 0; 1066 1066 int l = len; 1067 1067 1068 + if (!len) 1069 + return len; 1068 1070 if (page[l - 1] == '\n') { 1069 1071 --l; 1070 1072 ++bytes_to_strip; ··· 1190 1188 struct gadget_info *gi = os_desc_item_to_gadget_info(item); 1191 1189 int res, l; 1192 1190 1191 + if (!len) 1192 + return len; 1193 1193 l = min_t(int, len, OS_STRING_QW_SIGN_LEN >> 1); 1194 1194 if (page[l - 1] == '\n') 1195 1195 --l;
+2
drivers/usb/musb/musb_gadget.c
··· 1913 1913 * gadget driver here and have everything work; 1914 1914 * that currently misbehaves. 1915 1915 */ 1916 + usb_gadget_set_state(g, USB_STATE_NOTATTACHED); 1916 1917 1917 1918 /* Force check of devctl register for PM runtime */ 1918 1919 pm_runtime_mark_last_busy(musb->controller); ··· 2020 2019 case OTG_STATE_B_PERIPHERAL: 2021 2020 case OTG_STATE_B_IDLE: 2022 2021 musb_set_state(musb, OTG_STATE_B_IDLE); 2022 + usb_gadget_set_state(&musb->g, USB_STATE_NOTATTACHED); 2023 2023 break; 2024 2024 case OTG_STATE_B_SRP_INIT: 2025 2025 break;
+2
drivers/usb/serial/ftdi_sio.c
··· 803 803 .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, 804 804 { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID), 805 805 .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, 806 + { USB_DEVICE(FTDI_NDI_VID, FTDI_NDI_EMGUIDE_GEMINI_PID), 807 + .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, 806 808 { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, 807 809 { USB_DEVICE(NOVITUS_VID, NOVITUS_BONO_E_PID) }, 808 810 { USB_DEVICE(FTDI_VID, RTSYSTEMS_USB_VX8_PID) },
+3
drivers/usb/serial/ftdi_sio_ids.h
··· 204 204 #define FTDI_NDI_FUTURE_3_PID 0xDA73 /* NDI future device #3 */ 205 205 #define FTDI_NDI_AURORA_SCU_PID 0xDA74 /* NDI Aurora SCU */ 206 206 207 + #define FTDI_NDI_VID 0x23F2 208 + #define FTDI_NDI_EMGUIDE_GEMINI_PID 0x0003 /* NDI Emguide Gemini */ 209 + 207 210 /* 208 211 * ChamSys Limited (www.chamsys.co.uk) USB wing/interface product IDs 209 212 */
+5
drivers/usb/serial/option.c
··· 1415 1415 .driver_info = NCTRL(5) }, 1416 1416 { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x40) }, 1417 1417 { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x60) }, 1418 + { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x30), /* Telit FE910C04 (ECM) */ 1419 + .driver_info = NCTRL(4) }, 1420 + { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x40) }, 1418 1421 { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x30), /* Telit FN990B (MBIM) */ 1419 1422 .driver_info = NCTRL(6) }, 1420 1423 { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x40) }, ··· 2346 2343 .driver_info = RSVD(3) }, 2347 2344 { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff), /* Foxconn T99W651 RNDIS */ 2348 2345 .driver_info = RSVD(5) | RSVD(6) }, 2346 + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe167, 0xff), /* Foxconn T99W640 MBIM */ 2347 + .driver_info = RSVD(3) }, 2349 2348 { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */ 2350 2349 .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, 2351 2350 { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */