Thunderbolt 3 (Skylake / Alpine Ridge) hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Andreas,
I was asking around on #linux-pci on OFTC and it was mentioned that you were the maintainer for Linux Thunderbolt support, and that I should direct my query to you and the linux-pci & linux-kernel lists.
I'm attempting to use the Thunderbolt 3 (which has a USB Type-C connector) port on my laptop, a Dell XPS 15 (9550). The external device I'm attempting to use is a gigabit ethernet + USB 3.0 hub, of an unknown / generic brand, but bears model number KY-688 if that's of any use.
When the device is present at system startup, everything works correctly, and shows up in lspci as a USB controller, which lsusb shows having a hub and ethernet NIC attached, which the r8152 driver binds and uses without issue:
lspci -v:
Quoted 4 lines
0a:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30 [XHCI])
Subsystem: Device 2222:1111
Flags: bus master, fast devsel, latency 0, IRQ 131
Memory atc4200000(32-bit, non-prefetchable) [size=64K]
Quoted 8 lines
Capabilities: [80] Power Management version 3
Capabilities: [88] MSI: Enable+ Count=1/8 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number a3-21-b5-60-a7-23-04-00
Capabilities: [200] Advanced Error Reporting
Capabilities: [300] Virtual Channel
Capabilities: [400] Power Budgeting <?>
Capabilities: [500] Vendor Specific Information: ID=1234 Rev=1
Len=0d8 <?>
Quoted 3 lines
Capabilities: [600] Latency Tolerance Reporting
Capabilities: [700] #19
Kernel driver in use:xhci_hcd
lspci -tv (Thunderbolt device is 15b5)
Quoted 2 lines
-[0000:00]-+-00.0 Intel Corporation Sky Lake Host Bridge/DRAM Registers
+-01.0-[01]----00.0 NVIDIA Corporation GM107M [GeForce GTX
960M]
Quoted 3 lines
+-02.0 Intel Corporation Device 191b
+-04.0 Intel Corporation Device 1903
+-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCIController
Quoted 2 lines
+-14.2 Intel Corporation Sunrise Point-H Thermal subsystem
+-15.0 Intel Corporation Sunrise Point-H LPSS I2CController #0
Quoted 1 line
+-15.1 Intel Corporation Sunrise Point-H LPSS I2C
Controller #1
Quoted 2 lines
+-16.0 Intel Corporation Sunrise Point-H CSME HECI #1
+-1c.0-[02]----00.0 Broadcom Corporation BCM43602 802.11acWireless LAN SoC
Quoted 1 line
+-1c.1-[03]----00.0 Realtek Semiconductor Co., Ltd. Device
525a
Quoted 5 lines
+-1d.0-[04]----00.0 Samsung Electronics Co Ltd Device a802
+-1d.4-[05]--
+-1d.6-[06-3e]----00.0-[07-0a]--+-00.0-[08]--
| +-01.0-[09]--
| \-02.0-[0a]----00.0 IntelCorporation Device 15b5
Quoted 4 lines
+-1f.0 Intel Corporation Sunrise Point-H LPC Controller
+-1f.2 Intel Corporation Sunrise Point-H PMC
+-1f.3 Intel Corporation Sunrise Point-H HD Audio
\-1f.4 Intel Corporation Sunrise Point-H SMBuslsusb -tv:
Quoted 3 lines
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,
Driver=r8152, 5000M
Quoted 3 lines
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 3, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 3 lines
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 4: Dev 2, If 0, Class=Vendor Specific Class,Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 1, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 2, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 3, Class=Application Specific Interface,
Driver=, 12M
Quoted 2 lines
|__ Port 12: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 12: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480MHowever, if the device is connected after the system boots (or disconnected and reconnected), it is not detected at all. No messages show up in dmesg upon connection and no additional devices show up in the output of lspci & lsusb. Strangely enough, USB devices connected to the external hub do still receive power.
I also have the following options relating to PCI hotplug set in my kernel config:
Quoted 4 lines
CONFIG_HOTPLUG_PCI_PCIE=yCONFIG_HOTPLUG_PCI=yCONFIG_HOTPLUG_PCI_ACPI=yCONFIG_HOTPLUG_PCI_ACPI_IBM=y
I'm running the 4.4.2 kernel, booted via EFI. From what I've read, Thunderbolt hotplug has been working since 3.17, controlled by the CONFIG_THUNDERBOLT option. However regardless of whether this option is enabled or disabled, hotplug does not appeare to work on my hardware.
Quoted 1 line
From reading the in-kernel help text for this option, I suspect that
it's only relevant for the older Cactus Ridge Thunderbolt controller present in 2012-era MacBooks.
How can I go about finding additional information about just what's going on, hopefully to assist with improving support for this newer hardware?
Kind regards,
Jack
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJW0AhWAAoJEP0XuxcIDSnP9lwP/i/wNuNTQOKM40FZdcslJ4u1 uztebCxlMTt9MIQteZDSK5Srfof/EN9sT9TKQB8eBa7szzBC6ve37W+n5sKh189+ fMMOHBxVg10okCZk6WhyIrY1Q0kdIsOqCY80SoVRHZ0/1anP0+wBr1GAELhYVkrz ZoFTjvVG/fvuqXxs4es0S9wD7q9xgnMpSEHWjsc2h+XR1JvRyaifh6YrYQ0Y/sb7 XJ5TuaNb+LKT5RACuMLSPb+LeYoRd+KOD9O/5hZOunJdglFjr1SsPTMLE7OgSPgC JhQGc6jaRbI9xYfe95V+YiVG/R1rVmWyPO5K22XWvB96F2ecS+L9lTtSdvEMG3z8 AxxBoG+nu5b396Fk6+7Mt5tqyI6/pqxHf+sr2+znK7tzBxugz89IaGjN7AzQFFqc Y0529G+YcBegXhYkUJ4KWvjAnmXK0ovhMZg4+SMAxPK9KHlHfJtpHWdteyQwGYmJ LiwvbxskDXESUs+5W2CMPaJymcxp4MiRCrZvTKGojtCQh8TgPBYmFMwocDQ14kgI s8fW0GLchh9pcCpPZDifpnHOZUAS2V7ebP3eJnmC7N6XpCpvqOmR1+BXr9KMK4fb D2sQW1H2s5biBnsWZKsKj0ZIn5vMojMH1zbrUG7lqtdO4xNt6AN1H/Wp1Rqsgu5u D0x1areDAEKuToqgb0wJ
=AU/v
-----END PGP SIGNATURE-----
[+cc Rafael, linux-acpi]
Hi Jack,
Quoted 111 lines · Jack Coulter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256Hi Andreas,
I was asking around on #linux-pci on OFTC and it was mentioned that you were the maintainer for Linux Thunderbolt support, and that I should direct my query to you and the linux-pci & linux-kernel lists.
I'm attempting to use the Thunderbolt 3 (which has a USB Type-C connector) port on my laptop, a Dell XPS 15 (9550). The external device I'm attempting to use is a gigabit ethernet + USB 3.0 hub, of an unknown / generic brand, but bears model number KY-688 if that's of any use.
When the device is present at system startup, everything works correctly, and shows up in lspci as a USB controller, which lsusb shows having a hub and ethernet NIC attached, which the r8152 driver binds and uses without issue:
lspci -v:
Quoted 4 lines
0a:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30 [XHCI])
Subsystem: Device 2222:1111
Flags: bus master, fast devsel, latency 0, IRQ 131
Memory atc4200000(32-bit, non-prefetchable) [size=64K]Quoted 8 lines
Capabilities: [80] Power Management version 3
Capabilities: [88] MSI: Enable+ Count=1/8 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number a3-21-b5-60-a7-23-04-00
Capabilities: [200] Advanced Error Reporting
Capabilities: [300] Virtual Channel
Capabilities: [400] Power Budgeting <?>
Capabilities: [500] Vendor Specific Information: ID=1234 Rev=1Len=0d8 <?>
Quoted 3 lines
Capabilities: [600] Latency Tolerance Reporting
Capabilities: [700] #19
Kernel driver in use:xhci_hcdlspci -tv (Thunderbolt device is 15b5)
Quoted 2 lines
-[0000:00]-+-00.0 Intel Corporation Sky Lake Host Bridge/DRAM Registers
+-01.0-[01]----00.0 NVIDIA Corporation GM107M [GeForce GTX960M]
Quoted 3 lines
+-02.0 Intel Corporation Device 191b +-04.0 Intel Corporation Device 1903 +-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCIController
Quoted 2 lines
+-14.2 Intel Corporation Sunrise Point-H Thermal subsystem +-15.0 Intel Corporation Sunrise Point-H LPSS I2CController #0
Quoted 1 line
+-15.1 Intel Corporation Sunrise Point-H LPSS I2C
Controller #1
Quoted 2 lines
+-16.0 Intel Corporation Sunrise Point-H CSME HECI #1 +-1c.0-[02]----00.0 Broadcom Corporation BCM43602 802.11acWireless LAN SoC
Quoted 1 line
+-1c.1-[03]----00.0 Realtek Semiconductor Co., Ltd. Device525a
Quoted 5 lines
+-1d.0-[04]----00.0 Samsung Electronics Co Ltd Device a802 +-1d.4-[05]-- +-1d.6-[06-3e]----00.0-[07-0a]--+-00.0-[08]-- | +-01.0-[09]-- | \-02.0-[0a]----00.0 IntelCorporation Device 15b5
Quoted 4 lines
+-1f.0 Intel Corporation Sunrise Point-H LPC Controller +-1f.2 Intel Corporation Sunrise Point-H PMC +-1f.3 Intel Corporation Sunrise Point-H HD Audio \-1f.4 Intel Corporation Sunrise Point-H SMBuslsusb -tv:
Quoted 3 lines
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,Driver=r8152, 5000M
Quoted 3 lines
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device,Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 3, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 3 lines
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class,Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 1, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 2, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 3, Class=Application Specific Interface,
Driver=, 12M
Quoted 2 lines
|__ Port 12: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 12: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480MHowever, if the device is connected after the system boots (or disconnected and reconnected), it is not detected at all. No messages show up in dmesg upon connection and no additional devices show up in the output of lspci & lsusb. Strangely enough, USB devices connected to the external hub do still receive power.
I also have the following options relating to PCI hotplug set in my kernel config:
Quoted 4 lines
CONFIG_HOTPLUG_PCI_PCIE=yCONFIG_HOTPLUG_PCI=yCONFIG_HOTPLUG_PCI_ACPI=yCONFIG_HOTPLUG_PCI_ACPI_IBM=y
Quoted 7 lines
I'm running the 4.4.2 kernel, booted via EFI. From what I've read, Thunderbolt hotplug has been working since 3.17, controlled by the
CONFIG_THUNDERBOLToption. However regardless of whether this option is enabled or disabled, hotplug does not appeare to work on my hardware. From reading the in-kernel help text for this option, I suspect that it's only relevant for the older Cactus Ridge Thunderbolt controller present in 2012-era MacBooks.
Can you open a report at http://bugzilla.kernel.org, category drivers/PCI, and attach complete "lspci -vv" output (run as root) and complete dmesg logs, both when hub is attached at boot, and when booting without hub and attaching hub later?
I don't know much about Thunderbolt. But since it appears as a PCI device, I would expect some sort of hotplug notification when you attach the hub. If pciehp handles hotplug, it looks like we should see something from pcie_isr() in the dmesg log.
Since you don't see that, I suspect we're getting ACPI notifications via the acpiphp driver. I'm not as familiar with that, so I don't know what if anything it logs. If you're inclined, you could add some printks in
acpiphp_add_context()
acpi_device_hotplug()
acpiphp_hotplug_notify()
hotplug_event()
Then we'd at least see if we get any ACPI notifications.
Bjorn
Hi Jack,
Quoted 17 lines · Bjorn Helgaas
Quoted 10 lines · Jack Coulter
I'm attempting to use the Thunderbolt 3 (which has a USB Type-C connector) port on my laptop, a Dell XPS 15 (9550). The external device I'm attempting to use is a gigabit ethernet + USB 3.0 hub, of an unknown / generic brand, but bears model number KY-688 if that's of any use.
When the device is present at system startup, everything works correctly, and shows up in lspci as a USB controller, which lsusb shows having a hub and ethernet NIC attached, which the r8152 driver binds and uses without issue: [...]
Quoted 5 lines
However, if the device is connected after the system boots (or disconnected and reconnected), it is not detected at all. No messages show up in dmesg upon connection and no additional devices show up in the output of lspci & lsusb. Strangely enough, USB devices connected to the external hub do still receive power.
Quoted 4 lines
I don't know much about Thunderbolt. But since it appears as a PCI device, I would expect some sort of hotplug notification when you attach the hub. If pciehp handles hotplug, it looks like we should see something from
pcie_isr()in the dmesg log.
Try booting with: pcie_hp=nomsi
This is needed with the Light Ridge controller built into 2011/2012 Macs to receive hotplug notifications.
Best regards,
Lukas
Hi Lukas,
Quoted 1 line
Try booting with: pcie_hp=nomsi
I gave this a shot but unfortunately resulted in no change in behaviour
- the device is still not detected if it is connected after boot, and nothing shows in dmesg upon connection.
Kind regards,
Jack
Hi Bjorn,
Quoted 15 lines
Can you open a report at http://bugzilla.kernel.org, category
drivers/PCI, and attach complete "lspci -vv" output (run as root) and complete dmesg logs, both when hub is attached at boot, and when booting without hub and attaching hub later?I don't know much about Thunderbolt. But since it appears as a PCI device, I would expect some sort of hotplug notification when you attach the hub. If pciehp handles hotplug, it looks like we should see something from
pcie_isr()in the dmesg log.Since you don't see that, I suspect we're getting ACPI notifications via the acpiphp driver. I'm not as familiar with that, so I don't know what if anything it logs. If you're inclined, you could add some printks in
Quoted 8 lines
acpiphp_add_context()
acpi_device_hotplug()
acpiphp_hotplug_notify()
hotplug_event()Then we'd at least see if we get any ACPI notifications.
Bjorn
I've logged a report with the requested details; it can be found here:
https://bugzilla.kernel.org/show_bug.cgi?id=115121
Kind regards,
Jack
Hi Jack,
Quoted 111 lines · Jack Coulter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256Hi Andreas,
I was asking around on #linux-pci on OFTC and it was mentioned that you were the maintainer for Linux Thunderbolt support, and that I should direct my query to you and the linux-pci & linux-kernel lists.
I'm attempting to use the Thunderbolt 3 (which has a USB Type-C connector) port on my laptop, a Dell XPS 15 (9550). The external device I'm attempting to use is a gigabit ethernet + USB 3.0 hub, of an unknown / generic brand, but bears model number KY-688 if that's of any use.
When the device is present at system startup, everything works correctly, and shows up in lspci as a USB controller, which lsusb shows having a hub and ethernet NIC attached, which the r8152 driver binds and uses without issue:
lspci -v:
Quoted 4 lines
0a:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30 [XHCI])
Subsystem: Device 2222:1111
Flags: bus master, fast devsel, latency 0, IRQ 131
Memory atc4200000(32-bit, non-prefetchable) [size=64K]Quoted 8 lines
Capabilities: [80] Power Management version 3
Capabilities: [88] MSI: Enable+ Count=1/8 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number a3-21-b5-60-a7-23-04-00
Capabilities: [200] Advanced Error Reporting
Capabilities: [300] Virtual Channel
Capabilities: [400] Power Budgeting <?>
Capabilities: [500] Vendor Specific Information: ID=1234 Rev=1Len=0d8 <?>
Quoted 3 lines
Capabilities: [600] Latency Tolerance Reporting
Capabilities: [700] #19
Kernel driver in use:xhci_hcdlspci -tv (Thunderbolt device is 15b5)
Quoted 2 lines
-[0000:00]-+-00.0 Intel Corporation Sky Lake Host Bridge/DRAM Registers
+-01.0-[01]----00.0 NVIDIA Corporation GM107M [GeForce GTX960M]
Quoted 3 lines
+-02.0 Intel Corporation Device 191b +-04.0 Intel Corporation Device 1903 +-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCIController
Quoted 2 lines
+-14.2 Intel Corporation Sunrise Point-H Thermal subsystem +-15.0 Intel Corporation Sunrise Point-H LPSS I2CController #0
Quoted 1 line
+-15.1 Intel Corporation Sunrise Point-H LPSS I2C
Controller #1
Quoted 2 lines
+-16.0 Intel Corporation Sunrise Point-H CSME HECI #1 +-1c.0-[02]----00.0 Broadcom Corporation BCM43602 802.11acWireless LAN SoC
Quoted 1 line
+-1c.1-[03]----00.0 Realtek Semiconductor Co., Ltd. Device525a
Quoted 5 lines
+-1d.0-[04]----00.0 Samsung Electronics Co Ltd Device a802 +-1d.4-[05]-- +-1d.6-[06-3e]----00.0-[07-0a]--+-00.0-[08]-- | +-01.0-[09]-- | \-02.0-[0a]----00.0 IntelCorporation Device 15b5
Quoted 4 lines
+-1f.0 Intel Corporation Sunrise Point-H LPC Controller +-1f.2 Intel Corporation Sunrise Point-H PMC +-1f.3 Intel Corporation Sunrise Point-H HD Audio \-1f.4 Intel Corporation Sunrise Point-H SMBuslsusb -tv:
Quoted 3 lines
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,Driver=r8152, 5000M
Quoted 3 lines
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device,Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 3, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 3 lines
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class,Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 1, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 2, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 3, Class=Application Specific Interface,
Driver=, 12M
Quoted 2 lines
|__ Port 12: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 12: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480MHowever, if the device is connected after the system boots (or disconnected and reconnected), it is not detected at all. No messages show up in dmesg upon connection and no additional devices show up in the output of lspci & lsusb. Strangely enough, USB devices connected to the external hub do still receive power.
I also have the following options relating to PCI hotplug set in my kernel config:
Quoted 4 lines
CONFIG_HOTPLUG_PCI_PCIE=yCONFIG_HOTPLUG_PCI=yCONFIG_HOTPLUG_PCI_ACPI=yCONFIG_HOTPLUG_PCI_ACPI_IBM=y
Quoted 7 lines
I'm running the 4.4.2 kernel, booted via EFI. From what I've read, Thunderbolt hotplug has been working since 3.17, controlled by the
CONFIG_THUNDERBOLToption. However regardless of whether this option is enabled or disabled, hotplug does not appeare to work on my hardware. From reading the in-kernel help text for this option, I suspect that it's only relevant for the older Cactus Ridge Thunderbolt controller present in 2012-era MacBooks.
That is correct. On your device TB should be handled by the firmware.
Björn suggested that we might not be reacting to acpi notifications (or pci hotplug interrupts) properly. To confirm this you could try to issue a manual pci rescan via
echo "1" > /sys/bus/pci/rescan
This should make the device appear (if the issue lies with our handling of hotplug events).
Otherwise you might want to take a look at the ACPI tables and search for code which turn off thunderbolt or something like that. Does hotplug work under Windows (without additional drivers)?
Regards,
Andreas
Quoted 26 lines
How can I go about finding additional information about just what's going on, hopefully to assist with improving support for this newer hardware?
Kind regards,
Jack
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2iQIcBAEBCAAGBQJW0AhWAAoJEP0XuxcIDSnP9lwP/i/wNuNTQOKM40FZdcslJ4u1 uztebCxlMTt9MIQteZDSK5Srfof/EN9sT9TKQB8eBa7szzBC6ve37W+n5sKh189+ fMMOHBxVg10okCZk6WhyIrY1Q0kdIsOqCY80SoVRHZ0/1anP0+wBr1GAELhYVkrz ZoFTjvVG/fvuqXxs4es0S9wD7q9xgnMpSEHWjsc2h+XR1JvRyaifh6YrYQ0Y/sb7 XJ5TuaNb+LKT5RACuMLSPb+LeYoRd+KOD9O/5hZOunJdglFjr1SsPTMLE7OgSPgC JhQGc6jaRbI9xYfe95V+YiVG/R1rVmWyPO5K22XWvB96F2ecS+L9lTtSdvEMG3z8 AxxBoG+nu5b396Fk6+7Mt5tqyI6/pqxHf+sr2+znK7tzBxugz89IaGjN7AzQFFqc Y0529G+YcBegXhYkUJ4KWvjAnmXK0ovhMZg4+SMAxPK9KHlHfJtpHWdteyQwGYmJ LiwvbxskDXESUs+5W2CMPaJymcxp4MiRCrZvTKGojtCQh8TgPBYmFMwocDQ14kgI s8fW0GLchh9pcCpPZDifpnHOZUAS2V7ebP3eJnmC7N6XpCpvqOmR1+BXr9KMK4fb D2sQW1H2s5biBnsWZKsKj0ZIn5vMojMH1zbrUG7lqtdO4xNt6AN1H/Wp1Rqsgu5u D0x1areDAEKuToqgb0wJ
=AU/v
-----END PGP SIGNATURE-----
Quoted 4 lines · Andreas Noever <andreas.noever <at> gmail.com> writes:
Hi Jack,
On Fri, Feb 26, 2016 at 9:10 AM, Jack Coulter <jscinoz <at> jscinoz.so>
Quoted 15 lines · wrote:
Quoted 15 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256Hi Andreas,
I was asking around on #linux-pci on OFTC and it was mentioned that you were the maintainer for Linux Thunderbolt support, and that I should direct my query to you and the linux-pci & linux-kernel lists.
I'm attempting to use the Thunderbolt 3 (which has a USB Type-C connector) port on my laptop, a Dell XPS 15 (9550). The external device I'm attempting to use is a gigabit ethernet + USB 3.0 hub, of an unknown / generic brand, but bears model number KY-688 if that's of any use.
Quoted 7 lines
Quoted 7 lines
When the device is present at system startup, everything works correctly, and shows up in lspci as a USB controller, which lsusb shows having a hub and ethernet NIC attached, which the r8152 driver binds and uses without issue:
lspci -v:
Quoted 1 line
0a:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30
[XHCI])
Quoted 108 lines
Quoted 89 lines
Quoted 11 lines
Subsystem: Device 2222:1111
Flags: bus master, fast devsel, latency 0, IRQ 131 Memory atc4200000(32-bit, non-prefetchable) [size=64K]
Capabilities: [80] Power Management version 3
Capabilities: [88] MSI: Enable+ Count=1/8 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Device Serial Number a3-21-b5-60-a7-23-04-00
Capabilities: [200] Advanced Error Reporting
Capabilities: [300] Virtual Channel
Capabilities: [400] Power Budgeting <?>
Capabilities: [500] Vendor Specific Information: ID=1234 Rev=1Len=0d8 <?>
Quoted 3 lines
Capabilities: [600] Latency Tolerance Reporting
Capabilities: [700] #19
Kernel driver in use:xhci_hcdlspci -tv (Thunderbolt device is 15b5)
Quoted 2 lines
-[0000:00]-+-00.0 Intel Corporation Sky Lake Host Bridge/DRAM Registers
+-01.0-[01]----00.0 NVIDIA Corporation GM107M [GeForce GTX960M]
Quoted 3 lines
+-02.0 Intel Corporation Device 191b +-04.0 Intel Corporation Device 1903 +-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCIController
Quoted 2 lines
+-14.2 Intel Corporation Sunrise Point-H Thermal subsystem +-15.0 Intel Corporation Sunrise Point-H LPSS I2CController #0
Quoted 1 line
+-15.1 Intel Corporation Sunrise Point-H LPSS I2C
Controller #1
Quoted 2 lines
+-16.0 Intel Corporation Sunrise Point-H CSME HECI #1 +-1c.0-[02]----00.0 Broadcom Corporation BCM43602 802.11acWireless LAN SoC
Quoted 1 line
+-1c.1-[03]----00.0 Realtek Semiconductor Co., Ltd. Device525a
Quoted 5 lines
+-1d.0-[04]----00.0 Samsung Electronics Co Ltd Device a802 +-1d.4-[05]-- +-1d.6-[06-3e]----00.0-[07-0a]--+-00.0-[08]-- | +-01.0-[09]-- | \-02.0-[0a]----00.0 IntelCorporation Device 15b5
Quoted 4 lines
+-1f.0 Intel Corporation Sunrise Point-H LPC Controller +-1f.2 Intel Corporation Sunrise Point-H PMC +-1f.3 Intel Corporation Sunrise Point-H HD Audio \-1f.4 Intel Corporation Sunrise Point-H SMBuslsusb -tv:
Quoted 3 lines
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,Driver=r8152, 5000M
Quoted 3 lines
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device,Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 1 line
|__ Port 3: Dev 3, If 3, Class=Human Interface Device,
Driver=usbhid, 12M
Quoted 3 lines
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class,Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 1, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 2, Class=Vendor Specific Class,
Driver=btusb, 12M
Quoted 1 line
|__ Port 4: Dev 2, If 3, Class=Application Specific Interface,
Driver=, 12M
Quoted 2 lines
|__ Port 12: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 12: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480MHowever, if the device is connected after the system boots (or disconnected and reconnected), it is not detected at all. No messages show up in dmesg upon connection and no additional devices show up in the output of lspci & lsusb. Strangely enough, USB devices connected to the external hub do still receive power.
I also have the following options relating to PCI hotplug set in my kernel config:
Quoted 4 lines
CONFIG_HOTPLUG_PCI_PCIE=yCONFIG_HOTPLUG_PCI=yCONFIG_HOTPLUG_PCI_ACPI=yCONFIG_HOTPLUG_PCI_ACPI_IBM=yQuoted 7 lines
I'm running the 4.4.2 kernel, booted via EFI. From what I've read, Thunderbolt hotplug has been working since 3.17, controlled by the
CONFIG_THUNDERBOLToption. However regardless of whether this option is enabled or disabled, hotplug does not appeare to work on my hardware. From reading the in-kernel help text for this option, I suspect that it's only relevant for the older Cactus Ridge Thunderbolt controller present in 2012-era MacBooks.That is correct. On your device TB should be handled by the firmware.
Björn suggested that we might not be reacting to acpi notifications (or pci hotplug interrupts) properly. To confirm this you could try to issue a manual pci rescan via
echo "1" >
/sys/bus/pci/rescanThis should make the device appear (if the issue lies with our handling of hotplug events).
Quoted 31 lines
Otherwise you might want to take a look at the ACPI tables and search for code which turn off thunderbolt or something like that. Does hotplug work under Windows (without additional drivers)?
Regards,
AndreasQuoted 24 lines
How can I go about finding additional information about just what's going on, hopefully to assist with improving support for this newer hardware?
Kind regards,
Jack
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2iQIcBAEBCAAGBQJW0AhWAAoJEP0XuxcIDSnP9lwP/i/wNuNTQOKM40FZdcslJ4u1 uztebCxlMTt9MIQteZDSK5Srfof/EN9sT9TKQB8eBa7szzBC6ve37W+n5sKh189+ fMMOHBxVg10okCZk6WhyIrY1Q0kdIsOqCY80SoVRHZ0/1anP0+wBr1GAELhYVkrz ZoFTjvVG/fvuqXxs4es0S9wD7q9xgnMpSEHWjsc2h+XR1JvRyaifh6YrYQ0Y/sb7 XJ5TuaNb+LKT5RACuMLSPb+LeYoRd+KOD9O/5hZOunJdglFjr1SsPTMLE7OgSPgC JhQGc6jaRbI9xYfe95V+YiVG/R1rVmWyPO5K22XWvB96F2ecS+L9lTtSdvEMG3z8 AxxBoG+nu5b396Fk6+7Mt5tqyI6/pqxHf+sr2+znK7tzBxugz89IaGjN7AzQFFqc Y0529G+YcBegXhYkUJ4KWvjAnmXK0ovhMZg4+SMAxPK9KHlHfJtpHWdteyQwGYmJ LiwvbxskDXESUs+5W2CMPaJymcxp4MiRCrZvTKGojtCQh8TgPBYmFMwocDQ14kgI s8fW0GLchh9pcCpPZDifpnHOZUAS2V7ebP3eJnmC7N6XpCpvqOmR1+BXr9KMK4fb D2sQW1H2s5biBnsWZKsKj0ZIn5vMojMH1zbrUG7lqtdO4xNt6AN1H/Wp1Rqsgu5u D0x1areDAEKuToqgb0wJ
=AU/v
-----END PGP SIGNATURE-----
When I insert a USB device into the Thunderbolt 3 port on my XPS 15 9550, after a couple of minutes the kernel throws a hung task timeout into the syslog as follows:
Mar 16 20:42:10 xps15 kernel: [ 1440.163672] INFO: task kworker/0:1:50 blocked for more than 120 seconds. Mar 16 20:42:10 xps15 kernel: [ 1440.163680] Tainted: G W 4.5.0 #1 Mar 16 20:42:10 xps15 kernel: [ 1440.163683] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Mar 16 20:42:10 xps15 kernel: [ 1440.163686] kworker/0:1 D ffff8804bfc15a40 0 50 2 0x00000000 Mar 16 20:42:10 xps15 kernel: [ 1440.163702] Workqueue: kacpid acpi_os_execute_deferred Mar 16 20:42:10 xps15 kernel: [ 1440.163706] ffff8804ad3e2040 ffffffff81a12500 ffff8804acea8000 ffff8804acea7c80 Mar 16 20:42:10 xps15 kernel: [ 1440.163712] ffff880032e3ee20 ffff8804ad3e2040 0000000000000000 0000000000000000 Mar 16 20:42:10 xps15 kernel: [ 1440.163717] ffffffff815bde41 7fffffffffffffff ffffffff815c0cb2 7fffffffffffffff Mar 16 20:42:10 xps15 kernel: [ 1440.163723] Call Trace: Mar 16 20:42:10 xps15 kernel: [ 1440.163735] [<ffffffff815bde41>] ? schedule+0x31/0x80 Mar 16 20:42:10 xps15 kernel: [ 1440.163741] [<ffffffff815c0cb2>] ? schedule_timeout+0x1b2/0x270 Mar 16 20:42:10 xps15 kernel: [ 1440.163749] [<ffffffff813a6f94>] ? acpi_ut_repair_name+0x2d/0x7a Mar 16 20:42:10 xps15 kernel: [ 1440.163755] [<ffffffff8139c228>] ? acpi_ns_search_one_scope+0x20/0x3e Mar 16 20:42:10 xps15 kernel: [ 1440.163761] [<ffffffff8139c39f>] ? acpi_ns_search_and_enter+0x159/0x1ae Mar 16 20:42:10 xps15 kernel: [ 1440.163765] [<ffffffff815bfe05>] ? __down_timeout+0x75/0xc0 Mar 16 20:42:10 xps15 kernel: [ 1440.163773] [<ffffffff810b9a23>] ? down_timeout+0x43/0x50 Mar 16 20:42:10 xps15 kernel: [ 1440.163778] [<ffffffff81378a76>] ? acpi_os_wait_semaphore+0x48/0x62 Mar 16 20:42:10 xps15 kernel: [ 1440.163783] [<ffffffff81397366>] ? acpi_ex_system_wait_mutex+0x37/0x48 Mar 16 20:42:10 xps15 kernel: [ 1440.163788] [<ffffffff8138a295>] ? acpi_ds_begin_method_execution+0x138/0x1d0 Mar 16 20:42:10 xps15 kernel: [ 1440.163792] [<ffffffff8138a509>] ? acpi_ds_call_control_method+0x4f/0x165 Mar 16 20:42:10 xps15 kernel: [ 1440.163799] [<ffffffff8139f36c>] ? acpi_ps_parse_aml+0xa8/0x273 Mar 16 20:42:10 xps15 kernel: [ 1440.163805] [<ffffffff8139fb2c>] ? acpi_ps_execute_method+0x140/0x175 Mar 16 20:42:10 xps15 kernel: [ 1440.163810] [<ffffffff8139a3a9>] ? acpi_ns_evaluate+0x1b9/0x237 Mar 16 20:42:10 xps15 kernel: [ 1440.163816] [<ffffffff8138dc85>] ? acpi_ev_asynch_execute_gpe_method+0x98/0xff Mar 16 20:42:10 xps15 kernel: [ 1440.163820] [<ffffffff81377dfb>] ? acpi_os_execute_deferred+0x10/0x1a Mar 16 20:42:10 xps15 kernel: [ 1440.163826] [<ffffffff8108dada>] ? process_one_work+0x15a/0x410 Mar 16 20:42:10 xps15 kernel: [ 1440.163832] [<ffffffff8108dddd>] ? worker_thread+0x4d/0x480 Mar 16 20:42:10 xps15 kernel: [ 1440.163836] [<ffffffff8108dd90>] ? process_one_work+0x410/0x410 Mar 16 20:42:10 xps15 kernel: [ 1440.163843] [<ffffffff81093d3d>] ? kthread+0xcd/0xf0 Mar 16 20:42:10 xps15 kernel: [ 1440.163850] [<ffffffff81093c70>] ? kthread_create_on_node+0x190/0x190 Mar 16 20:42:10 xps15 kernel: [ 1440.163857] [<ffffffff815c1f8f>] ? ret_from_fork+0x3f/0x70 Mar 16 20:42:10 xps15 kernel: [ 1440.163863] [<ffffffff81093c70>] ?
kthread_create_on_node+0x190/0x190
During this period some other devices attached by USB, externally or internally (notably the touchpad), become unusable, but they seem to recover afterward.
In addition, devices attached to the USB ports (even the traditional USB 3.x Type A ports) after the hung task timeout do not seem to be recognized by the system.
The same device appears to work properly with an A-to-C adapter on the Type A ports.
I will try the kernel boot options suggested in this thread to see if they help matters.
Chris
Hi Andreas,
Quoted 10 lines
That is correct. On your device TB should be handled by the firmware.
Björn suggested that we might not be reacting to acpi notifications (or pci hotplug interrupts) properly. To confirm this you could try to issue a manual pci rescan via
echo "1" >
/sys/bus/pci/rescanThis should make the device appear (if the issue lies with our handling of hotplug events).
I tried this but unfortunately no additional devices showed up, nor was any additional dmesg output generated.
Quoted 3 lines
Otherwise you might want to take a look at the ACPI tables and search for code which turn off thunderbolt or something like that. Does hotplug work under Windows (without additional drivers)?
I'm unable to comment as to whether it works under Windows - I do not have Windows installed on this machine nor do I have sufficient unallocated disk space to install it.
Kind regards,
Jack