https://bugzilla.kernel.org/show_bug.cgi?id=220705

--- Comment #9 from Lukas Wunner ([email protected]) ---
Created attachment 308867
  --> https://bugzilla.kernel.org/attachment.cgi?id=308867&action=edit
Patch to intercept writes to Link Control register

Thanks a lot AdriĆ  for your continued effort to narrow down the issue.

Since you didn't see the log line introduced by the patch until resuming from
system sleep, it seems the BIOS does set ASPM correctly on initial boot. So
maybe the BIOS isn't the culprit but the kernel is doing something wrong.

I note that we're using a spinlock to protect read-modify-writes of the Slot
Control register, but were also doing direct writes in a couple of places
without taking the spinlock. In theory it would be possible that there are race
conditions where the register contents inadvertently get clobbered. On the
other hand, the fact that you're seeing the issue consistently suggests that it
might not be a race (which is normally not that easy to reproduce).

I'm attaching a debug patch which seeks to intercept all writes to the Slot
Control register of the Root Port and of the wifi card. It emits the old and
new value of the register and also dumps the stack each time so that we can see
where the write came from.

This may get quite noisy and dmesg output might become large, so you may want
to add "log_buf_len=16M" to the kernel command line to ensure nothing gets
lost.

In addition, please add "pci=earlydump" to the kernel command line. This will
emit a hexdump of config space of every device upon enumeration, before the
kernel starts touching it. It should allow us to understand whether BIOS really
set the Link Control register to sane values.

If you could attach the resulting dmesg output again I'd be grateful. Please
apply the patch on top of a stock v6.18-rc1 (or newer) kernel with
CONFIG_PCIEASPM_DEFAULT=y.

Thanks!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to