Created attachment 273801 [details] Dmesg If the device is disconnected the following message appears in the dmesg: [ 100.814687] usb 3-1: USB disconnect, device number 3 [ 100.882840] xhci_hcd 0000:39:00.0: xHCI host controller not responding, assume dead [ 100.882843] xhci_hcd 0000:39:00.0: HC died; cleaning up No further connections or disconnections display anything further in the dmesg, the device works fine if connected via USB-A
This isn't a regression, I've had this issue since getting the laptop at the end of 2015
On Tue, Jan 23, 2018 at 12:31:53AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=198557 > > Bug ID: 198557 > Summary: USB-C Devices only show up if connected at boot > Product: Drivers > Version: 2.5 > Kernel Version: 4.15-rc4 All USB bugs should be sent to the linux-usb@vger.kernel.org mailing list, and not entered into bugzilla. Please bring this issue up there, if it is still a problem in the latest kernel release.
Created attachment 273869 [details] Updated Dmesg (CONFIG_HOTPLUG_PCI_ACPI=y)
Created attachment 273871 [details] Kernel Config
All the ACPI dump stuff can be found at https://bugzilla.kernel.org/show_bug.cgi?id=198051
Thanks, can you still do one more test? Add "acpiphp.dyndbg" to your kernel command line. Then boot the system so that you don't have anything connected to the USB-C port. Once the system is fully booted, plug in the USB-C device. Don't do manual rescan or anything. Then attach full dmesg to this bug and also output of lspci.
I'll do that when I'm home tonight, if there's anything I can do remotely before then let me know.
Created attachment 273889 [details] Dmesg with dyn debug Here's the plug and unplug events [ 26.988174] ACPI: \_SB_.PCI0.RP01: acpiphp_glue: Bus check in hotplug_event() [ 129.086070] ACPI: \_SB_.PCI0.RP01: acpiphp_glue: Bus check in hotplug_event()
Created attachment 273907 [details] Add more debugging to ACPIphp It seems that for some reason ACPIphp does not detect there is a new device in th slot. Could you apply the attached patch and try again the same steps? Then attach dmesg.
Created attachment 273917 [details] Dmesg with extra debugging Here's the useful lines: [ 25.472180] ACPI: \_SB_.PCI0.RP01: acpiphp_glue: Bus check in hotplug_event() [ 25.472185] pcieport 0000:00:1c.0: ACPIphp scanning bridge [ 25.472202] pci_bus 0000:02: 0x2 dvid 0xffffffff [ 25.472203] acpiphp_glue: get_slot_status() returns: 0x0 [ 25.472204] acpiphp_glue: ACPIphp disabling slot [ 25.472205] pcieport 0000:00:1c.0: ACPIphp bridge scanned
And the disconnect: [ 342.209521] ACPI: \_SB_.PCI0.RP01: acpiphp_glue: Bus check in hotplug_event() [ 342.209525] pcieport 0000:00:1c.0: ACPIphp scanning bridge [ 342.209551] pci_bus 0000:02: 0x2 dvid 0xffffffff [ 342.209551] acpiphp_glue: get_slot_status() returns: 0x0 [ 342.209552] acpiphp_glue: ACPIphp disabling slot [ 342.209554] pcieport 0000:00:1c.0: ACPIphp bridge scanned
Created attachment 273919 [details] ACPIphp debugging and read dvid of upstream port ACPI tables of that system list PXSX device with 2 as an address: Device (PXSX) { Name (_ADR, 0x02) // _ADR: Address and ACPIphp then uses that address to check for the device presence. I think that is not correct because we get Notify() directly to the root port. Could you apply the attached patch (remove the previous one) and try again the same steps? Then attach dmesg.
Created attachment 273923 [details] Dmesg which shows it working That seems to work now
It also seems to fix my disappearing disk during suspend
Great, thanks for testing. I'll make a proper patch and send it upstream soon.
Would you mind attaching the final patch here? I'm not subscribed to the LKML or Linux PCI Also would this fix be back ported to older kernels?
Sure, I'll attach it here and CC you as well when it will be submitted upstream. Since it is fix it most likely will be included in stable releases.
On Wed, Jan 31, 2018 at 10:48:44AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > Sure, I'll attach it here and CC you as well when it will be submitted > upstream. Since it is fix it most likely will be included in stable releases. Please also cc: me, and properly tag the patch for stable inclusion so it gets added to those trees automagically. thanks, greg k-h
Created attachment 274125 [details] ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status() Attaching the patch here as well. I just sent it upstream for review.