From: Chris Lawrence <chris@lordsutch.com>
To: linux-acpi@vger.kernel.org
Subject: Re: Thunderbolt 3 (Skylake / Alpine Ridge) hotplug
Date: Thu, 17 Mar 2016 00:59:21 +0000 (UTC) [thread overview]
Message-ID: <loom.20160317T015227-926@post.gmane.org> (raw)
In-Reply-To: CAMxnaaU0B_47xZuD+vi0=b1_U7kPr7YVF5-Y0q3GP3ez_eo3CQ@mail.gmail.com
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>
wrote:
> >
> > -----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:
> >> 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 at c4200000 (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=1
> > Len=0d8 <?>
> >> Capabilities: [600] Latency Tolerance Reporting
> >> Capabilities: [700] #19
> >> Kernel driver in use: xhci_hcd
> >
> >
> > lspci -tv (Thunderbolt device is 15b5)
> >> -[0000:00]-+-00.0 Intel Corporation Sky Lake Host Bridge/DRAM Registers
> >> +-01.0-[01]----00.0 NVIDIA Corporation GM107M [GeForce GTX
> > 960M]
> >> +-02.0 Intel Corporation Device 191b
> >> +-04.0 Intel Corporation Device 1903
> >> +-14.0 Intel Corporation Sunrise Point-H USB 3.0 xHCI
> > Controller
> >> +-14.2 Intel Corporation Sunrise Point-H Thermal subsystem
> >> +-15.0 Intel Corporation Sunrise Point-H LPSS I2C
> > Controller #0
> >> +-15.1 Intel Corporation Sunrise Point-H LPSS I2C
> > Controller #1
> >> +-16.0 Intel Corporation Sunrise Point-H CSME HECI #1
> >> +-1c.0-[02]----00.0 Broadcom Corporation BCM43602 802.11ac
> > Wireless LAN SoC
> >> +-1c.1-[03]----00.0 Realtek Semiconductor Co., Ltd. Device
> > 525a
> >> +-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 Intel
> > Corporation Device 15b5
> >> +-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 SMBus
> >
> > lsusb -tv:
> >> /: 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
> >> /: 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
> >> |__ Port 3: Dev 3, If 1, Class=Human Interface Device,
> > Driver=usbhid, 12M
> >> |__ Port 3: Dev 3, If 2, Class=Human Interface Device,
> > Driver=usbhid, 12M
> >> |__ Port 3: Dev 3, If 3, Class=Human Interface Device,
> > Driver=usbhid, 12M
> >> /: 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
> >> |__ Port 4: Dev 2, If 1, Class=Vendor Specific Class,
> > Driver=btusb, 12M
> >> |__ Port 4: Dev 2, If 2, Class=Vendor Specific Class,
> > Driver=btusb, 12M
> >> |__ Port 4: Dev 2, If 3, Class=Application Specific Interface,
> > Driver=, 12M
> >> |__ Port 12: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
> >> |__ Port 12: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
> >
> >
> > 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.
> >
> > I also have the following options relating to PCI hotplug set in my
> > kernel config:
> >
> >> CONFIG_HOTPLUG_PCI_PCIE=y
> >> CONFIG_HOTPLUG_PCI=y
> >> CONFIG_HOTPLUG_PCI_ACPI=y
> >> CONFIG_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.
> > 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
>
> > 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-----
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
next prev parent reply other threads:[~2016-03-17 1:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56D0085B.60402@jscinoz.so>
2016-03-15 17:29 ` Thunderbolt 3 (Skylake / Alpine Ridge) hotplug Bjorn Helgaas
2016-03-16 13:22 ` Lukas Wunner
2016-03-22 8:06 ` Jack Coulter
2016-03-22 8:26 ` Jack Coulter
2016-03-15 18:03 ` Andreas Noever
2016-03-17 0:59 ` Chris Lawrence [this message]
2016-03-22 8:11 ` Jack Coulter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20160317T015227-926@post.gmane.org \
--to=chris@lordsutch.com \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox