Depending on the current link state the steps to resume the link to U0
varies. The normal case when a port is suspended (U3) we set the link
to U0 and wait for a port event when U3exit completed and port moved to
U0.
If the port is in U1/U2, then no event is issued, just set link to U0
If port is in Resume or Recovery state then the device has already
initiated resume, and this host initiated resume is racing against it.
Port event handler for device initiated resume will set link to U0,
just wait for the port to reach U0 before returning.
The xHCI spec doesn't specify the upper bound of U3 transition time. For
some devices 20ms is not enough, so we need to make sure the link state
is in U3 before further actions.
I've tried to use U3 Entry Capability by setting U3 Entry Enable in
config register, however the port change event for U3 transition
interrupts the system suspend process.
For now let's use the less ideal method by polling PLS.
[use usleep_range(), and shorten the delay time while polling -Mathias]
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Mathias Nyman <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit eb002726fac7cefb98ff39ddb89e150a1c24fe85 linux-next)
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>
The commit created by update-version-dkms doesn't have any BugLink, so it
gets added to the debian changelog under "* Miscellaneous Ubuntu changes".
Fix it by to adding a BugLink to https://bugs.launchpad.net/bugs/1786013
("Packaging resync"), which is the bug report being used for all the other
automated commits.
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Paolo Pisati <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>
r8169 doesn't suport ASPM L1.1, so we don't have to disable ASPM
completely. Disable ASPM L1.1 doesn't affect the power consumption and
the network function keeps working after S3 test 30 times.