Bug 194895 - ASPM is not getting enabled following hotplug on default policy
Summary: ASPM is not getting enabled following hotplug on default policy
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-15 18:10 UTC by Sinan Kaya
Modified: 2017-03-16 02:53 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.10
Subsystem:
Regression: No
Bisected commit-id:


Attachments
boot log with 4.9 (67.81 KB, text/plain)
2017-03-16 02:52 UTC, Sinan Kaya
Details
lspci_after_insertion_with_01_01_00_0 (45.92 KB, text/plain)
2017-03-16 02:53 UTC, Sinan Kaya
Details
lspci_before_remove_l0s_enabled_on_01_01_00_00 (44.89 KB, text/plain)
2017-03-16 02:53 UTC, Sinan Kaya
Details

Description Sinan Kaya 2017-03-15 18:10:35 UTC
When the operating system is booted with the default ASPM policy
(POLICY_DEFAULT), current code is querying the enable/disable
states from ASPM registers to determine the policy.

For example, a BIOS could set the power saving state to performance
and clear all ASPM control registers. A balanced ASPM policy could
enable L0s and disable L1. A power conscious BIOS could enable both
L0s and L1 to trade off latency and performance vs. power.

After hotplug removal, pcie_aspm_exit_link_state() function clears
the ASPM registers. An insertion following hotplug removal reads
incorrect policy as ASPM disabled even though ASPM was enabled
during boot.

This is caused by the fact that same function is used for reconfiguring
ASPM regardless of the of the power on state.
Comment 1 Bjorn Helgaas 2017-03-15 19:14:14 UTC
I understand the bug here and I agree we need to fix this, but for completeness and the benefit of future readers, could you please attach a complete "lspci -vv" output before the hotplug removal, another one from after the hotplug insertion, and the complete dmesg log?  I wonder if there's anything we could log in dmesg that would be useful here.  It might be more noise than it's worth, but then again, ASPM problems seem pretty common.
Comment 2 Sinan Kaya 2017-03-16 02:52:50 UTC
Created attachment 255275 [details]
boot log with 4.9

I have network connectivity issues on 4.10 that is preventing me to collect logs. 

I attached the logs from 4.9 instead as the issue is there as well.
Comment 3 Sinan Kaya 2017-03-16 02:53:22 UTC
Created attachment 255277 [details]
lspci_after_insertion_with_01_01_00_0
Comment 4 Sinan Kaya 2017-03-16 02:53:55 UTC
Created attachment 255279 [details]
lspci_before_remove_l0s_enabled_on_01_01_00_00

Note You need to log in before you can comment on or make changes to this bug.