Skip to contentSkip to conversation

New: Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

Bug 216822 [email protected] 1 participant 6 messages Dec 19, 2022 – Dec 22, 2022 USB

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=216822

Bug ID: 216822
Summary: Thunderbolt USB Controller (Maple Ridge) and its
upstream pcie port fail to runtime resume
Product: Drivers
Version: 2.5
Kernel Version: kernel 6.0 and later
Hardware: Intel
OS: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: USB
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 303426
--> https://bugzilla.kernel.org/attachment.cgi?id=303426&action=edit
output of lspci -vt

The xHCI host controller(8086:1138) of the TBT4 add-on card fail to detect any USB-C devices after boot. After forcing the runtime resume by echo 'on' > '/sys/bus/usb/devices/usb4/power/control, the connected usb-c device can be detected.
After turn on PCI_DEBUG and DEBUG of the usbcode/xhci_hcd, there seems no problem when the usb port go into runtime suspend

```
[  579.488151] xhci_hcd 0000:13:00.0: set port remote wake mask, actual port
4-1 status  = 0xe0002a0
[  579.488221] xhci_hcd 0000:13:00.0: set port remote wake mask, actual port
4-2 status  = 0xe0002a0
[  579.488239] hub 4-0:1.0: hub_suspend
[  579.488260] usb usb4: bus auto-suspend, wakeup 1
[  579.488283] xhci_hcd 0000:13:00.0: xhci_hub_status_data: stopping usb4 port
polling
[  579.488306] xhci_hcd 0000:13:00.0: config port 4-1 wake bits, portsc:
0xa0002a0, write: 0xa0202a0
[  579.488316] xhci_hcd 0000:13:00.0: config port 4-2 wake bits, portsc:
0xa0002a0, write: 0xa0202a0
[  579.488323] xhci_hcd 0000:13:00.0: config port 3-1 wake bits, portsc:
0xa0002a0, write: 0xa0202a0
[  579.488328] xhci_hcd 0000:13:00.0: config port 3-2 wake bits, portsc:
0xa0002a0, write: 0xa0202a0
[  579.488333] xhci_hcd 0000:13:00.0: xhci_suspend: stopping usb3 port polling.
[  579.488359] xhci_hcd 0000:13:00.0: // Setting command ring address to
0x11aa08001
[  579.488536] xhci_hcd 0000:13:00.0: hcd_pci_runtime_suspend: 0
```

but no messages in kernel after plug in a usb device. I expect to see the runtime resume first on the upstream port pcieport 0000:00:1d.0, and then the xhci_hcd 0000:13:00.0 but nothing. Please refer to the attached lspci output for the device information and suggest what we should do next to find out the cause. Thanks

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 216822] Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

https://bugzilla.kernel.org/show_bug.cgi?id=216822

--- Comment #1 from Chris Chiu ([email protected]) --- Created attachment 303427
--> https://bugzilla.kernel.org/attachment.cgi?id=303427&action=edit
output of lspci -vvv

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 216822] Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216822

--- Comment #2 from Chris Chiu ([email protected]) --- Created attachment 303428
--> https://bugzilla.kernel.org/attachment.cgi?id=303428&action=edit
kernel log while booting with a usb storage connected to usb4

The usb-c storage can be detected during boot. But it can't be detected after re-plug the same device.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 216822] Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216822

Jacob Moroni ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Jacob Moroni ([email protected]) ---
I see similar behavior with the Gigabyte GC-Maple Ridge add-in card, except I can’t even get my USB devices to show up after setting power/control to “on”.

There are no kernel log messages printed at all when plugging/removing USBC devices on this card.

True Thunderbolt devices seem to work though.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 216822] Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216822

--- Comment #4 from Max Lee ([email protected]) ---
On this platforms, OEM didn't design RTD3 on Maple Ridge.
Since the MR AIC is to share with other desktop projects, and the NVM was set to Native + RTD3 enabled.
This cause the driver to get the RTD3 enabled from NVM. and set Linux TBT controller in D3 state then PME doesn't toggled by device hot plug. Current BIOS sent _S0W to TBT RP and the NVM native +RTD3 doesn't change to native only. Is this a correct setting on the NVM to support non-RTD3 platform? should BIOS sent command to modify NVM offset to disable RTD3?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw

[Bug 216822] Thunderbolt USB Controller (Maple Ridge) and its upstream pcie port fail to runtime resume

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216822

--- Comment #5 from Jacob Moroni ([email protected]) ---
I should add that in my case, I’m using this add-in card in a system that has no BIOS support for Thunderbolt. The motherboard doesn’t have a Thunderbolt header, so I am pulling pin 1 of the 5 pin connector up to 3.3V to force the card to turn on, which I’m guessing is the equivalent of writing 1 to /sys/bus/wmi/devices/86CCFD48-205E-4A77-9C48-2021CBEDE341/force_power on a system with real support for this card.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.