Skip to contentSkip to conversation

acpiphp and pciehp not working together on Thinkpad X200s

DISCUSSION Stefan Seyfried 3 participants 10 messages Aug 11, 2013 – Aug 13, 2013 PCI

lore
Share & tools
lore
#0 lore raw

Hi all,

after openSUSE changed its kernel config to statically build in acpiphp and pciehp, my ExpressCard slot does not work anymore. The workaround is to disable acpiphp with acpiphp.disable=1

To be honest, I cannot say if it ever worked with both drivers loaded, since I always had to load pciehp manually to get the slot working. I don't think I ever tried acpiphp before. If necessary, I can either build a kernel with both drivers modularized or just boot an old kernel from before the config change.

I did diff both dmesg outputs and the only differences I can see are:

-kernel: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
+kernel: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5, disabled by user; please report a bug

@@ -401,7 +400,6 @@
kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
kernel: pci 0000:00:1c.1: bridge window [mem 0xf2500000-0xf25fffff]
-kernel: acpiphp: Slot [1] registered
kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
kernel: pci 0000:00:1c.3: bridge window [io 0x2000-0x2fff]
kernel: pci 0000:00:1c.3: bridge window [mem 0xf0000000-0xf1ffffff]

@@ -585,8 +583,7 @@
kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16 -kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver +kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
kernel: pciehp: PCI Express Hot Plug Controller Driver version: 0.4
kernel: intel_idle: does not run on family 6 model 23
kernel: GHES: HEST is not enabled!

The other changes are
* kernel command line (obviously)
* timing related (small difference in cpu freq / jiffies)

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Best regards,

Stefan

Signature · 6 lines
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
#1 lore raw
Quoted 37 lines · Stefan Seyfried

Hi all,

after openSUSE changed its kernel config to statically build in acpiphp and pciehp, my ExpressCard slot does not work anymore. The workaround is to disable acpiphp with acpiphp.disable=1

To be honest, I cannot say if it ever worked with both drivers loaded, since I always had to load pciehp manually to get the slot working. I don't think I ever tried acpiphp before. If necessary, I can either build a kernel with both drivers modularized or just boot an old kernel from before the config change.

I did diff both dmesg outputs and the only differences I can see are:

(quoted diff) +2 -4
-kernel: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
+kernel: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5, disabled by user; please report a bug
@@ -401,7 +400,6 @@
 kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
 kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
 kernel: pci 0000:00:1c.1:   bridge window [mem 0xf2500000-0xf25fffff]
-kernel: acpiphp: Slot [1] registered
 kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
 kernel: pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
 kernel: pci 0000:00:1c.3:   bridge window [mem 0xf0000000-0xf1ffffff]
@@ -585,8 +583,7 @@
 kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
 kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
 kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16
-kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver
+kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
 kernel: pciehp: PCI Express Hot Plug Controller Driver version: 0.4
 kernel: intel_idle: does not run on family 6 model 23
 kernel: GHES: HEST is not enabled!
Quoted 8 lines

The other changes are
* kernel command line (obviously)
* timing related (small difference in cpu freq / jiffies)

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Which kernel is that?

Rafael

#2 lore raw

Hi Rafael,

Am 11.08.2013 23:25, schrieb Rafael J. Wysocki:

Quoted 17 lines · Stefan Seyfried
Quoted 15 lines

kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
kernel: pci 0000:00:1c.1: bridge window [mem 0xf2500000-0xf25fffff]

(quoted diff) +1 -3
-kernel: acpiphp: Slot [1] registered
 kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
 kernel: pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
 kernel: pci 0000:00:1c.3:   bridge window [mem 0xf0000000-0xf1ffffff]
 
 kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
 kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
 kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16
-kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver
+kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
Quoted 6 lines
Quoted 4 lines

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Which kernel is that?

That's 3.11rc4, openSUSE Kernel:HEAD repository.

Thanks,

Stefan

Signature · 6 lines
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
#3 lore raw
Quoted 20 lines · Stefan Seyfried

Hi Rafael,

Am 11.08.2013 23:25, schrieb Rafael J. Wysocki:

Quoted 16 lines · Stefan Seyfried
Quoted 15 lines

kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
kernel: pci 0000:00:1c.1: bridge window [mem 0xf2500000-0xf25fffff]

(quoted diff) +1 -3
-kernel: acpiphp: Slot [1] registered
 kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
 kernel: pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
 kernel: pci 0000:00:1c.3:   bridge window [mem 0xf0000000-0xf1ffffff]
 
 kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
 kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
 kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16
-kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver
+kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Which kernel is that?

That's 3.11rc4, openSUSE Kernel:HEAD repository.

OK

Please use the acpiphp.disable=1 workaround for how. The problem is kind of known and we'll address it some time in the future, but it is hard to say when that's going to happen and this point.

There's some ACPIPHP rework material queued up for 3.12 in linux-next, but I doubt it'll make a difference on your machine. Anyway, if you want to try it, you can just pull the linux-next branch of my linux-pm.git tree (to avoid pulling all of the other linux-next material in addition to it).

Thanks,
Rafael

maintainer
#4 lore raw
Quoted 32 lines · Rafael J. Wysocki
Quoted 20 lines · Stefan Seyfried

Hi Rafael,

Am 11.08.2013 23:25, schrieb Rafael J. Wysocki:

Quoted 16 lines · Stefan Seyfried
Quoted 15 lines

kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
kernel: pci 0000:00:1c.1: bridge window [mem 0xf2500000-0xf25fffff]

(quoted diff) +1 -3
-kernel: acpiphp: Slot [1] registered
 kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
 kernel: pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
 kernel: pci 0000:00:1c.3:   bridge window [mem 0xf0000000-0xf1ffffff]
 
 kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
 kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
 kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16
-kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver
+kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Which kernel is that?

That's 3.11rc4, openSUSE Kernel:HEAD repository.

OK

Quoted 8 lines

Please use the acpiphp.disable=1 workaround for how. The problem is kind of known and we'll address it some time in the future, but it is hard to say when that's going to happen and this point.

There's some ACPIPHP rework material queued up for 3.12 in linux-next, but I doubt it'll make a difference on your machine. Anyway, if you want to try it, you can just pull the linux-next branch of my linux-pm.git tree (to avoid pulling all of the other linux-next material in addition to it).

Thanks for the report, Stefan. I opened
https://bugzilla.kernel.org/show_bug.cgi?id=60736 so we don't forget about this. If you could attach complete dmesg logs for both cases (working and failing) to that bugzilla, that would be great. An acpidump might also be interesting, since the ACPI namespace determines what acpiphp does.

I suspect that we're being too aggressive about determining when we should use one or the other of acpiphp and pciehp. We basically decide up front which one we expect the platform to use, and we only listen to signals from that one. But I wonder if we should just prepare for signals from both.

Bjorn

#5 lore raw

Hi Bjorn,

Am 12.08.2013 19:21, schrieb Bjorn Helgaas:

Quoted 6 lines

Thanks for the report, Stefan. I opened
https://bugzilla.kernel.org/show_bug.cgi?id=60736 so we don't forget about this. If you could attach complete dmesg logs for both cases (working and failing) to that bugzilla, that would be great. An acpidump might also be interesting, since the ACPI namespace determines what acpiphp does.

Ok, I added all that information to the bug.

Quoted 5 lines

I suspect that we're being too aggressive about determining when we should use one or the other of acpiphp and pciehp. We basically decide up front which one we expect the platform to use, and we only listen to signals from that one. But I wonder if we should just prepare for signals from both.

Actually I booted an older Kernel (3.7.10, openSUSE 12.3 kernel) which has both drivers configured as modules.
The interesting thing is: I was not able to load acpiphp there, it errored out with ENODEV.
So maybe something changed, making acpiphp more (too?) relaxed.

Should I try building the latest kernel with both drivers as modules to see if this makes a difference?

Best regards,

Stefan

Signature · 6 lines
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
maintainer
#6 lore raw
Quoted 4 lines · Stefan Seyfried

Hi Bjorn,

Am 12.08.2013 19:21, schrieb Bjorn Helgaas:

Quoted 8 lines
Quoted 6 lines

Thanks for the report, Stefan. I opened
https://bugzilla.kernel.org/show_bug.cgi?id=60736 so we don't forget about this. If you could attach complete dmesg logs for both cases (working and failing) to that bugzilla, that would be great. An acpidump might also be interesting, since the ACPI namespace determines what acpiphp does.

Ok, I added all that information to the bug.

Thanks!

Quoted 6 lines
Quoted 5 lines

I suspect that we're being too aggressive about determining when we should use one or the other of acpiphp and pciehp. We basically decide up front which one we expect the platform to use, and we only listen to signals from that one. But I wonder if we should just prepare for signals from both.

Quoted 8 lines

Actually I booted an older Kernel (3.7.10, openSUSE 12.3 kernel) which has both drivers configured as modules.
The interesting thing is: I was not able to load acpiphp there, it errored out with ENODEV.
So maybe something changed, making acpiphp more (too?) relaxed.

Should I try building the latest kernel with both drivers as modules to see if this makes a difference?

No, don't bother. Neither one can be built as a module any more anyway (6037a803b removed it for acpiphp, and c10cc483b did the same for pciehp). There was never a good way to auto-load the modules, so it really didn't make much sense to have them be modules.

Just bug us periodically if nothing seems to be happening on the bug report :)

Bjorn

#7 lore raw
In reply to Bjorn Helgaas
Quoted 49 lines · Bjorn Helgaas
Quoted 32 lines · Rafael J. Wysocki
Quoted 20 lines · Stefan Seyfried

Hi Rafael,

Am 11.08.2013 23:25, schrieb Rafael J. Wysocki:

Quoted 16 lines · Stefan Seyfried
Quoted 15 lines

kernel: pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
kernel: pci 0000:00:1c.1: PCI bridge to [bus 03]
kernel: pci 0000:00:1c.1: bridge window [mem 0xf2500000-0xf25fffff]

(quoted diff) +1 -3
-kernel: acpiphp: Slot [1] registered
 kernel: pci 0000:00:1c.3: PCI bridge to [bus 05-0c]
 kernel: pci 0000:00:1c.3:   bridge window [io  0x2000-0x2fff]
 kernel: pci 0000:00:1c.3:   bridge window [mem 0xf0000000-0xf1ffffff]
 
 kernel: pciehp 0000:00:1c.1:pcie04: HPC vendor_id 8086 device_id 2942 ss_vid 17aa ss_did 20f3
 kernel: pciehp 0000:00:1c.1:pcie04: service driver pciehp loaded
 kernel: pciehp 0000:00:1c.3:pcie04: HPC vendor_id 8086 device_id 2946 ss_vid 17aa ss_did 20f3
-kernel: pciehp 0000:00:1c.3:pcie04: pci_hp_register failed with error -16
-kernel: pciehp 0000:00:1c.3:pcie04: Slot already registered by another hotplug driver
+kernel: pciehp 0000:00:1c.3:pcie04: service driver pciehp loaded
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Greg told me to report the issue here, so I'm doing that :-)

If you need more information (would a complete dmesg of both cases be useful?), just let me know.

Which kernel is that?

That's 3.11rc4, openSUSE Kernel:HEAD repository.

OK

Quoted 8 lines

Please use the acpiphp.disable=1 workaround for how. The problem is kind of known and we'll address it some time in the future, but it is hard to say when that's going to happen and this point.

There's some ACPIPHP rework material queued up for 3.12 in linux-next, but I doubt it'll make a difference on your machine. Anyway, if you want to try it, you can just pull the linux-next branch of my linux-pm.git tree (to avoid pulling all of the other linux-next material in addition to it).

Thanks for the report, Stefan. I opened
https://bugzilla.kernel.org/show_bug.cgi?id=60736 so we don't forget about this. If you could attach complete dmesg logs for both cases (working and failing) to that bugzilla, that would be great. An acpidump might also be interesting, since the ACPI namespace determines what acpiphp does.

Quoted 5 lines

I suspect that we're being too aggressive about determining when we should use one or the other of acpiphp and pciehp. We basically decide up front which one we expect the platform to use, and we only listen to signals from that one. But I wonder if we should just prepare for signals from both.

I think we should.

Since both have to be built-in now, we can actually enforce certain ordering between them. I don't care which one goes first, but it should be consistent between boots etc. IMO.

Now, regardless of which one goes first, the second one should just check if the slot has already been registered and simply add itself to the existing slot if so.

The removal may be a bit more trickier from what I can say.

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#8 lore raw
In reply to Rafael J. Wysocki

Hi Rafael,

Am 11.08.2013 23:36, schrieb Rafael J. Wysocki:

Quoted 4 lines

There's some ACPIPHP rework material queued up for 3.12 in linux-next, but I doubt it'll make a difference on your machine. Anyway, if you want to try it, you can just pull the linux-next branch of my linux-pm.git tree (to avoid pulling all of the other linux-next material in addition to it).

Just for the record: I tried that, and it did not change anything (acpiphp claims the slot and pciehp then does not work).

Best regards,

Stefan

Signature · 6 lines
Stefan Seyfried
Linux Consultant & Developer -- GPG Key: 0x731B665B

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
#9 lore raw
Quoted 1 line · Stefan Seyfried

Hi Rafael,

Hi,

Quoted 9 lines

Am 11.08.2013 23:36, schrieb Rafael J. Wysocki:

Quoted 4 lines

There's some ACPIPHP rework material queued up for 3.12 in linux-next, but I doubt it'll make a difference on your machine. Anyway, if you want to try it, you can just pull the linux-next branch of my linux-pm.git tree (to avoid pulling all of the other linux-next material in addition to it).

Just for the record: I tried that, and it did not change anything (acpiphp claims the slot and pciehp then does not work).

The idea was that acpiphp might work instead, but then it would work previously too most likely.

Thanks,
Rafael