Skip to contentSkip to conversation

Issue with 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on")

DISCUSSION Mika Westerberg 2 participants 3 messages Nov 28, 2019 1 message not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

For some reason I don't see this in linux-pci archives. Maybe it was not accepted because of the attachment? In any case the full dmesg can be found here as well:

https://gist.github.com/westeri/ca2574a4e48dc6e3eb76184922e103e5

Quoted 31 lines · Mika Westerberg

Hi,

I noticed that latest Bjorn's pci/pm branch breaks native PCIe hotplug so that when I unplug a device (connected over TBT) the pciehp notices it but then the core PCI code starts waiting for all the devices that are now gone:

[  160.344476] pcieport 0000:04:04.0: pciehp: pciehp_check_link_active: lnk_status = 5041
[  160.344531] pcieport 0000:04:04.0: pciehp: Slot(4): Card not present
[  160.346004] pcieport 0000:04:04.0: pciehp: pciehp_unconfigure_device: domain:bus:dev = 0000:3a:00
[  161.421569] pcieport 0000:3a:00.0: not ready 1023ms after Switch to D0; waiting
[  162.509610] pcieport 0000:3a:00.0: not ready 2047ms after Switch to D0; waiting
[  164.621620] pcieport 0000:3a:00.0: not ready 4095ms after Switch to D0; waiting
[  169.165529] pcieport 0000:3a:00.0: not ready 8191ms after Switch to D0; waiting
[  177.869521] pcieport 0000:3a:00.0: not ready 16383ms after Switch to D0; waiting
[  194.765581] pcieport 0000:3a:00.0: not ready 32767ms after Switch to D0; waiting

...

It seems to continue forever so the devices are not removed from the system.

The test system used here is Dell XPS 9380 but it happens also on other systems that support native PCIe hotplug.

Reverting 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on") makes the problem go away.

I've attached full dmesg from the system. The way I reproduce this is that I boot the system up (no device connected yet), the I connect TBT dock that includes the PCIe switch etc. Then I unplug the dock. The unplug happens around 160.335355 in the dmesg.

#2 lore raw
Quoted 40 lines · Mika Westerberg

Hi,

For some reason I don't see this in linux-pci archives. Maybe it was not accepted because of the attachment? In any case the full dmesg can be found here as well:

https://gist.github.com/westeri/ca2574a4e48dc6e3eb76184922e103e5

Quoted 31 lines · Mika Westerberg

Hi,

I noticed that latest Bjorn's pci/pm branch breaks native PCIe hotplug so that when I unplug a device (connected over TBT) the pciehp notices it but then the core PCI code starts waiting for all the devices that are now gone:

[  160.344476] pcieport 0000:04:04.0: pciehp: pciehp_check_link_active: lnk_status = 5041
[  160.344531] pcieport 0000:04:04.0: pciehp: Slot(4): Card not present
[  160.346004] pcieport 0000:04:04.0: pciehp: pciehp_unconfigure_device: domain:bus:dev = 0000:3a:00
[  161.421569] pcieport 0000:3a:00.0: not ready 1023ms after Switch to D0; waiting
[  162.509610] pcieport 0000:3a:00.0: not ready 2047ms after Switch to D0; waiting
[  164.621620] pcieport 0000:3a:00.0: not ready 4095ms after Switch to D0; waiting
[  169.165529] pcieport 0000:3a:00.0: not ready 8191ms after Switch to D0; waiting
[  177.869521] pcieport 0000:3a:00.0: not ready 16383ms after Switch to D0; waiting
[  194.765581] pcieport 0000:3a:00.0: not ready 32767ms after Switch to D0; waiting

...

It seems to continue forever so the devices are not removed from the system.

The test system used here is Dell XPS 9380 but it happens also on other systems that support native PCIe hotplug.

Reverting 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on") makes the problem go away.

I've attached full dmesg from the system. The way I reproduce this is that I boot the system up (no device connected yet), the I connect TBT dock that includes the PCIe switch etc. Then I unplug the dock. The unplug happens around 160.335355 in the dmesg.

Thanks for testing this. I dropped 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on") for now. We can sort this out for v5.6.

#3 lore raw
Quoted 37 lines · Bjorn Helgaas
Quoted 36 lines · Mika Westerberg

Hi,

For some reason I don't see this in linux-pci archives. Maybe it was not accepted because of the attachment? In any case the full dmesg can be found here as well:

https://gist.github.com/westeri/ca2574a4e48dc6e3eb76184922e103e5

Quoted 27 lines · Mika Westerberg

Hi,

I noticed that latest Bjorn's pci/pm branch breaks native PCIe hotplug so that when I unplug a device (connected over TBT) the pciehp notices it but then the core PCI code starts waiting for all the devices that are now gone:

[  160.344476] pcieport 0000:04:04.0: pciehp: pciehp_check_link_active: lnk_status = 5041
[  160.344531] pcieport 0000:04:04.0: pciehp: Slot(4): Card not present
[  160.346004] pcieport 0000:04:04.0: pciehp: pciehp_unconfigure_device: domain:bus:dev = 0000:3a:00
[  161.421569] pcieport 0000:3a:00.0: not ready 1023ms after Switch to D0; waiting
[  162.509610] pcieport 0000:3a:00.0: not ready 2047ms after Switch to D0; waiting
[  164.621620] pcieport 0000:3a:00.0: not ready 4095ms after Switch to D0; waiting
[  169.165529] pcieport 0000:3a:00.0: not ready 8191ms after Switch to D0; waiting
[  177.869521] pcieport 0000:3a:00.0: not ready 16383ms after Switch to D0; waiting
[  194.765581] pcieport 0000:3a:00.0: not ready 32767ms after Switch to D0; waiting

...

It seems to continue forever so the devices are not removed from the system.

The test system used here is Dell XPS 9380 but it happens also on other systems that support native PCIe hotplug.

Reverting 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on") makes the problem go away.

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

I've attached full dmesg from the system. The way I reproduce this is that I boot the system up (no device connected yet), the I connect TBT dock that includes the PCIe switch etc. Then I unplug the dock. The unplug happens around 160.335355 in the dmesg.

Thanks for testing this. I dropped 395f121e6199 ("PCI/PM: Wait for device to become ready after power-on") for now. We can sort this out for v5.6.

Thanks!