** Also affects: linux (Ubuntu Stonking)
   Importance: Undecided
       Status: Invalid

** Also affects: linux-oem-6.17 (Ubuntu Stonking)
   Importance: Undecided
       Status: Invalid

** Changed in: linux (Ubuntu Stonking)
       Status: Invalid => In Progress

** Changed in: linux (Ubuntu Stonking)
     Assignee: (unassigned) => AceLan Kao (acelankao)

** Description changed:

+ SRU Justification for Resolute
+ ==============================
+ 
+ [Impact]
+ On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot 
enter suspend. Screen turns off, fan stops, power LED goes off, but the system 
never reaches S0ix: slp_s0_residency stays 0 and package C-state stalls at C10 
entry. Hits 100%.
+ 
+ Root cause: RTL8116AF runs in SFP/SerDes mode. The old r8169 driver has
+ no clean way to model this without phylink, so link handling and multi-
+ function power management for this chip are incomplete. RTL8116AF is
+ also a multi-function card: all functions (including hidden functions
+ 2-7) must be put to D3hot and have ASPM enabled so the platform can
+ reach C10 and s0ix. Without this, the PCIe link stays active and blocks
+ package low-power entry.
+ 
+ [Fix]
+ The earlier fix for this bug (see bug 2160475 history) carried a smaller 
5-patch quirk-gated series limited to a single Dell DMI match. Upstream 
reworked the whole approach: Realtek moved the driver over to phylink and 
reworked SerDes/link handling properly, so a DMI quirk is no longer needed. 
This SRU replaces the old quirk-based patch set with the finished v9 series (7 
patches, not yet in a released kernel):
+ 
+   r8169: add speed in private struct
+   net: phy: phylink: add helper to modify pause
+   r8169: add support for phylink
+   r8169: add support for RTL8116af
+   r8169: add support for RTL8127atf
+   r8169: add ltr support for RTL8117 series
+   r8169: fix RTL8116af can not enter s0idle and c10
+ 
+ These move r8169 to phylink, add SerDes-based link handling for
+ RTL8116af (and RTL8127atf) without a per-device DMI quirk, add LTR
+ support for the RTL8117 family, and put the hidden multi-function parts
+ of RTL8116af into D3hot with ASPM enabled so the platform can reach
+ C10/s0ix.
+ 
+ Not yet merged into a released kernel. Posted upstream as v9 on netdev:
+ https://lore.kernel.org/netdev/[email protected]/
+ 
+ [Test Plan]
+ On Dell Pro 5 Micro P5M1260:
+ 1. Boot the fixed kernel.
+ 2. Trigger suspend:
+    $ sudo rtcwake -m mem -s 20
+ 3. After resume, check S0ix residency:
+    $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
+    (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
+ 
+ Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix; 
system looks suspended (screen/fan/LED off) but never enters S0ix.
+ With patch: slp_s0_residency increments after each suspend; package reaches 
C10/s0ix.
+ Repeat 20+ cycles to confirm stability.
+ 
+ Also check basic networking still works after the switch to phylink:
+ $ ip link set <iface> up && ping -c 5 <gateway>
+ Link should come up and negotiate the expected speed on RTL8116af, 
RTL8127atf, and other r8169-supported chips.
+ 
+ [Where problems could occur]
+ Could break the r8169 driver broadly, since this moves link handling from the 
old phylib path to phylink for all supported chips, not just RTL8116AF. If the 
phylink conversion has a bug, link could fail to come up, autonegotiation could 
pick the wrong speed/duplex, or pause frame handling could break on any 
r8169-supported card. The SerDes changes for RTL8116af/RTL8127atf could 
misidentify the SFP mode on other VER_52/VER_63-class chips and cause a link 
failure or wrong speed report. The multi-function D3hot/ASPM change applies 
unconditionally (no DMI quirk this time) to all RTL8116AF boards, so if the 
hidden-function detection is wrong, other RTL8116AF machines could see the 
ethernet function itself put into the wrong power state, or fail to reach 
low-power states. The LTR change for RTL8117 could cause tx/rx stalls on 
RTL8117 systems if l1.2 entry timing is off.
+ 
+ ==========================
+ 
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot
  enter suspend. Screen turns off, fan stops, power LED goes off, but the
  system never reaches S0ix: slp_s0_residency stays 0 and package C-state
  stalls at C10 entry. Hits 100%.
  
  Root cause: RTL8116AF runs in SFP/SerDes mode. The r8169 driver needs a
  dummy PHY ID so phylib can attach a dummy Realtek PHY driver, with the
  needed standard PHY registers served through the SerDes register. Also
  RTL8116AF is a multi-function card: all functions (including hidden
  functions 2-7) must be put to D3hot and have ASPM enabled so the platform
  can reach C10 and s0ix. Without these, the PCIe link stays active and
  blocks package low-power entry.
  
  [Fix]
  Backport Realtek's 5-patch r8169 RTL8116AF series (v1, the smallest set
  that fixes the issue):
  
    net: phy: realtek: add support for dummy phy
    r8169: move functions forward
    r8169: fix RTL8116af link readiness bug
    r8169: add ltr support for RTL8116af
    r8169: fix RTL8116af can not enter s0idle and c10
  
  These add the dummy PHY, SerDes register handling, LTR/ASPM and
  multi-function D3hot programming for RTL_GIGA_MAC_VER_52 (RTL8116AF).
  
  Because these changes touch RTL_GIGA_MAC_VER_52 broadly, they are gated
  behind a Dell Pro 5 Micro P5M1260 DMI quirk (a per-device rtl8116af_quirk
  flag). Only the matched machine takes the new path; other
  RTL8116AF/VER_52 systems keep the current behavior.
  
  Upstream status: not merged into a released kernel yet. Realtek posted a
  larger phylink-based series (v6, 7 patches) still under review on netdev:
    https://lore.kernel.org/netdev/[email protected]/
  We use the smaller v1 5-patch set as a quirk workaround until that lands.
  The 5-patch set we carry:
    https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
     $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
     $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
     (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
  
  Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix;
  system looks suspended (screen/fan/LED off) but never enters S0ix.
  With patch: slp_s0_residency increments after each suspend; package
  reaches C10/s0ix.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  Could break the r8169 driver on RTL8116AF / RTL_GIGA_MAC_VER_52 systems.
  If the DMI match or the rtl8116af_quirk gating is wrong, the dummy-PHY /
  SerDes / LTR changes could apply to the wrong device or be skipped on the
  target, causing: the link not coming up (dummy PHY not attached), wrong
  link speed reported, or the device failing to reach low-power states on
  other VER_52 boards. The quirk uses an exact DMI product-name match to
  keep the blast radius to the single matched Dell machine; any regression
  is confined to that platform.

** Description changed:

  SRU Justification for Resolute
  ==============================
  
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot 
enter suspend. Screen turns off, fan stops, power LED goes off, but the system 
never reaches S0ix: slp_s0_residency stays 0 and package C-state stalls at C10 
entry. Hits 100%.
  
- Root cause: RTL8116AF runs in SFP/SerDes mode. The old r8169 driver has
- no clean way to model this without phylink, so link handling and multi-
- function power management for this chip are incomplete. RTL8116AF is
- also a multi-function card: all functions (including hidden functions
- 2-7) must be put to D3hot and have ASPM enabled so the platform can
- reach C10 and s0ix. Without this, the PCIe link stays active and blocks
+ RTL8116AF runs in SFP/SerDes mode and is a multi-function card. Hidden
+ functions 2-7 must be put into D3hot with ASPM enabled so the platform
+ can reach C10/s0ix. Without this, the PCIe link stays active and blocks
  package low-power entry.
  
  [Fix]
- The earlier fix for this bug (see bug 2160475 history) carried a smaller 
5-patch quirk-gated series limited to a single Dell DMI match. Upstream 
reworked the whole approach: Realtek moved the driver over to phylink and 
reworked SerDes/link handling properly, so a DMI quirk is no longer needed. 
This SRU replaces the old quirk-based patch set with the finished v9 series (7 
patches, not yet in a released kernel):
+ Backport the upstream v9 r8169 phylink series (7 patches, not yet in a 
released kernel):
  
    r8169: add speed in private struct
    net: phy: phylink: add helper to modify pause
    r8169: add support for phylink
    r8169: add support for RTL8116af
    r8169: add support for RTL8127atf
    r8169: add ltr support for RTL8117 series
    r8169: fix RTL8116af can not enter s0idle and c10
  
- These move r8169 to phylink, add SerDes-based link handling for
- RTL8116af (and RTL8127atf) without a per-device DMI quirk, add LTR
- support for the RTL8117 family, and put the hidden multi-function parts
- of RTL8116af into D3hot with ASPM enabled so the platform can reach
- C10/s0ix.
+ These move r8169 to phylink, add SerDes link handling for RTL8116af and
+ RTL8127atf, add LTR support for RTL8117, and put RTL8116AF's hidden
+ functions into D3hot with ASPM enabled.
  
- Not yet merged into a released kernel. Posted upstream as v9 on netdev:
  https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
     $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
     $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
-    (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
  
- Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix; 
system looks suspended (screen/fan/LED off) but never enters S0ix.
- With patch: slp_s0_residency increments after each suspend; package reaches 
C10/s0ix.
+ Without patch: slp_s0_residency stays 0, package never reaches C10/s0ix.
+ With patch: slp_s0_residency increments after each suspend.
  Repeat 20+ cycles to confirm stability.
  
- Also check basic networking still works after the switch to phylink:
- $ ip link set <iface> up && ping -c 5 <gateway>
- Link should come up and negotiate the expected speed on RTL8116af, 
RTL8127atf, and other r8169-supported chips.
+ [Where problems could occur]
+ This moves r8169 link handling from phylib to phylink for all supported 
chips, not just RTL8116AF. A phylink bug could break link-up, autonegotiation, 
or pause handling on any r8169 card. The SerDes changes could misidentify SFP 
mode on other VER_52/VER_63 chips, causing link failure or wrong speed. The 
D3hot/ASPM change on RTL8116AF's hidden functions could put the ethernet 
function itself into the wrong power state if function detection is wrong. The 
RTL8117 LTR change could cause tx/rx stalls if l1.2 entry timing is off.
  
- [Where problems could occur]
- Could break the r8169 driver broadly, since this moves link handling from the 
old phylib path to phylink for all supported chips, not just RTL8116AF. If the 
phylink conversion has a bug, link could fail to come up, autonegotiation could 
pick the wrong speed/duplex, or pause frame handling could break on any 
r8169-supported card. The SerDes changes for RTL8116af/RTL8127atf could 
misidentify the SFP mode on other VER_52/VER_63-class chips and cause a link 
failure or wrong speed report. The multi-function D3hot/ASPM change applies 
unconditionally (no DMI quirk this time) to all RTL8116AF boards, so if the 
hidden-function detection is wrong, other RTL8116AF machines could see the 
ethernet function itself put into the wrong power state, or fail to reach 
low-power states. The LTR change for RTL8117 could cause tx/rx stalls on 
RTL8117 systems if l1.2 entry timing is off.
- 
- ==========================
+ ======================
  
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot
  enter suspend. Screen turns off, fan stops, power LED goes off, but the
  system never reaches S0ix: slp_s0_residency stays 0 and package C-state
  stalls at C10 entry. Hits 100%.
  
  Root cause: RTL8116AF runs in SFP/SerDes mode. The r8169 driver needs a
  dummy PHY ID so phylib can attach a dummy Realtek PHY driver, with the
  needed standard PHY registers served through the SerDes register. Also
  RTL8116AF is a multi-function card: all functions (including hidden
  functions 2-7) must be put to D3hot and have ASPM enabled so the platform
  can reach C10 and s0ix. Without these, the PCIe link stays active and
  blocks package low-power entry.
  
  [Fix]
  Backport Realtek's 5-patch r8169 RTL8116AF series (v1, the smallest set
  that fixes the issue):
  
    net: phy: realtek: add support for dummy phy
    r8169: move functions forward
    r8169: fix RTL8116af link readiness bug
    r8169: add ltr support for RTL8116af
    r8169: fix RTL8116af can not enter s0idle and c10
  
  These add the dummy PHY, SerDes register handling, LTR/ASPM and
  multi-function D3hot programming for RTL_GIGA_MAC_VER_52 (RTL8116AF).
  
  Because these changes touch RTL_GIGA_MAC_VER_52 broadly, they are gated
  behind a Dell Pro 5 Micro P5M1260 DMI quirk (a per-device rtl8116af_quirk
  flag). Only the matched machine takes the new path; other
  RTL8116AF/VER_52 systems keep the current behavior.
  
  Upstream status: not merged into a released kernel yet. Realtek posted a
  larger phylink-based series (v6, 7 patches) still under review on netdev:
    https://lore.kernel.org/netdev/[email protected]/
  We use the smaller v1 5-patch set as a quirk workaround until that lands.
  The 5-patch set we carry:
    https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
     $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
     $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
     (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
  
  Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix;
  system looks suspended (screen/fan/LED off) but never enters S0ix.
  With patch: slp_s0_residency increments after each suspend; package
  reaches C10/s0ix.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  Could break the r8169 driver on RTL8116AF / RTL_GIGA_MAC_VER_52 systems.
  If the DMI match or the rtl8116af_quirk gating is wrong, the dummy-PHY /
  SerDes / LTR changes could apply to the wrong device or be skipped on the
  target, causing: the link not coming up (dummy PHY not attached), wrong
  link speed reported, or the device failing to reach low-power states on
  other VER_52 boards. The quirk uses an exact DMI product-name match to
  keep the blast radius to the single matched Dell machine; any regression
  is confined to that platform.

** Description changed:

  SRU Justification for Resolute
  ==============================
  
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot 
enter suspend. Screen turns off, fan stops, power LED goes off, but the system 
never reaches S0ix: slp_s0_residency stays 0 and package C-state stalls at C10 
entry. Hits 100%.
  
  RTL8116AF runs in SFP/SerDes mode and is a multi-function card. Hidden
  functions 2-7 must be put into D3hot with ASPM enabled so the platform
  can reach C10/s0ix. Without this, the PCIe link stays active and blocks
  package low-power entry.
  
  [Fix]
- Backport the upstream v9 r8169 phylink series (7 patches, not yet in a 
released kernel):
+ Backport the upstream v9 r8169 phylink series (included in net-next):
  
-   r8169: add speed in private struct
-   net: phy: phylink: add helper to modify pause
-   r8169: add support for phylink
-   r8169: add support for RTL8116af
-   r8169: add support for RTL8127atf
-   r8169: add ltr support for RTL8117 series
-   r8169: fix RTL8116af can not enter s0idle and c10
+   r8169: add speed in private struct
+   net: phy: phylink: add helper to modify pause
+   r8169: add support for phylink
+   r8169: add support for RTL8116af
+   r8169: add support for RTL8127atf
+   r8169: add ltr support for RTL8117 series
+   r8169: fix RTL8116af can not enter s0idle and c10
  
  These move r8169 to phylink, add SerDes link handling for RTL8116af and
  RTL8127atf, add LTR support for RTL8117, and put RTL8116AF's hidden
  functions into D3hot with ASPM enabled.
  
  https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
-    $ sudo rtcwake -m mem -s 20
+    $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
-    $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
+    $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
  
  Without patch: slp_s0_residency stays 0, package never reaches C10/s0ix.
  With patch: slp_s0_residency increments after each suspend.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  This moves r8169 link handling from phylib to phylink for all supported 
chips, not just RTL8116AF. A phylink bug could break link-up, autonegotiation, 
or pause handling on any r8169 card. The SerDes changes could misidentify SFP 
mode on other VER_52/VER_63 chips, causing link failure or wrong speed. The 
D3hot/ASPM change on RTL8116AF's hidden functions could put the ethernet 
function itself into the wrong power state if function detection is wrong. The 
RTL8117 LTR change could cause tx/rx stalls if l1.2 entry timing is off.
  
  ======================
  
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot
  enter suspend. Screen turns off, fan stops, power LED goes off, but the
  system never reaches S0ix: slp_s0_residency stays 0 and package C-state
  stalls at C10 entry. Hits 100%.
  
  Root cause: RTL8116AF runs in SFP/SerDes mode. The r8169 driver needs a
  dummy PHY ID so phylib can attach a dummy Realtek PHY driver, with the
  needed standard PHY registers served through the SerDes register. Also
  RTL8116AF is a multi-function card: all functions (including hidden
  functions 2-7) must be put to D3hot and have ASPM enabled so the platform
  can reach C10 and s0ix. Without these, the PCIe link stays active and
  blocks package low-power entry.
  
  [Fix]
  Backport Realtek's 5-patch r8169 RTL8116AF series (v1, the smallest set
  that fixes the issue):
  
    net: phy: realtek: add support for dummy phy
    r8169: move functions forward
    r8169: fix RTL8116af link readiness bug
    r8169: add ltr support for RTL8116af
    r8169: fix RTL8116af can not enter s0idle and c10
  
  These add the dummy PHY, SerDes register handling, LTR/ASPM and
  multi-function D3hot programming for RTL_GIGA_MAC_VER_52 (RTL8116AF).
  
  Because these changes touch RTL_GIGA_MAC_VER_52 broadly, they are gated
  behind a Dell Pro 5 Micro P5M1260 DMI quirk (a per-device rtl8116af_quirk
  flag). Only the matched machine takes the new path; other
  RTL8116AF/VER_52 systems keep the current behavior.
  
  Upstream status: not merged into a released kernel yet. Realtek posted a
  larger phylink-based series (v6, 7 patches) still under review on netdev:
    https://lore.kernel.org/netdev/[email protected]/
  We use the smaller v1 5-patch set as a quirk workaround until that lands.
  The 5-patch set we carry:
    https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
     $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
     $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
     (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
  
  Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix;
  system looks suspended (screen/fan/LED off) but never enters S0ix.
  With patch: slp_s0_residency increments after each suspend; package
  reaches C10/s0ix.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  Could break the r8169 driver on RTL8116AF / RTL_GIGA_MAC_VER_52 systems.
  If the DMI match or the rtl8116af_quirk gating is wrong, the dummy-PHY /
  SerDes / LTR changes could apply to the wrong device or be skipped on the
  target, causing: the link not coming up (dummy PHY not attached), wrong
  link speed reported, or the device failing to reach low-power states on
  other VER_52 boards. The quirk uses an exact DMI product-name match to
  keep the blast radius to the single matched Dell machine; any regression
  is confined to that platform.

** Description changed:

  SRU Justification for Resolute
  ==============================
- 
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot 
enter suspend. Screen turns off, fan stops, power LED goes off, but the system 
never reaches S0ix: slp_s0_residency stays 0 and package C-state stalls at C10 
entry. Hits 100%.
  
  RTL8116AF runs in SFP/SerDes mode and is a multi-function card. Hidden
  functions 2-7 must be put into D3hot with ASPM enabled so the platform
  can reach C10/s0ix. Without this, the PCIe link stays active and blocks
  package low-power entry.
  
  [Fix]
- Backport the upstream v9 r8169 phylink series (included in net-next):
+ Cherry-pick 7 commits from net-next (v9 r8169 phylink series from Realtek):
  
-   r8169: add speed in private struct
-   net: phy: phylink: add helper to modify pause
-   r8169: add support for phylink
-   r8169: add support for RTL8116af
-   r8169: add support for RTL8127atf
-   r8169: add ltr support for RTL8117 series
-   r8169: fix RTL8116af can not enter s0idle and c10
+   ddffc67d89c8 r8169: add speed in private struct
+   9f8cb9cbcdc8 net: phy: phylink: add helper to modify pause
+   8a3c76523e44 r8169: add support for phylink
+   dab515216def r8169: add support for RTL8116af
+   97dee72abc37 r8169: add support for RTL8127atf
+   6e445f3d9538 r8169: add ltr support for RTL8117 series
+   a306cbd79e07 r8169: fix RTL8116af can not enter s0idle and c10
  
  These move r8169 to phylink, add SerDes link handling for RTL8116af and
  RTL8127atf, add LTR support for RTL8117, and put RTL8116AF's hidden
  functions into D3hot with ASPM enabled.
  
+ Merged in net-next, not yet in a released kernel version. Original v9 posting:
  https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
-    $ sudo rtcwake -m mem -s 20
+    $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
-    $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
+    $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
  
  Without patch: slp_s0_residency stays 0, package never reaches C10/s0ix.
  With patch: slp_s0_residency increments after each suspend.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  This moves r8169 link handling from phylib to phylink for all supported 
chips, not just RTL8116AF. A phylink bug could break link-up, autonegotiation, 
or pause handling on any r8169 card. The SerDes changes could misidentify SFP 
mode on other VER_52/VER_63 chips, causing link failure or wrong speed. The 
D3hot/ASPM change on RTL8116AF's hidden functions could put the ethernet 
function itself into the wrong power state if function detection is wrong. The 
RTL8117 LTR change could cause tx/rx stalls if l1.2 entry timing is off.
+ 
+ [Other Info]
+ Commits are merged in net-next but not yet in a released kernel tag; 
cherry-picked directly from net-next by hash.
+ SRU for linux (Ubuntu Resolute).
  
  ======================
  
  [Impact]
  On Dell Pro 5 Micro P5M1260 (RTL8116AF / "RTK 1G OM"), the system cannot
  enter suspend. Screen turns off, fan stops, power LED goes off, but the
  system never reaches S0ix: slp_s0_residency stays 0 and package C-state
  stalls at C10 entry. Hits 100%.
  
  Root cause: RTL8116AF runs in SFP/SerDes mode. The r8169 driver needs a
  dummy PHY ID so phylib can attach a dummy Realtek PHY driver, with the
  needed standard PHY registers served through the SerDes register. Also
  RTL8116AF is a multi-function card: all functions (including hidden
  functions 2-7) must be put to D3hot and have ASPM enabled so the platform
  can reach C10 and s0ix. Without these, the PCIe link stays active and
  blocks package low-power entry.
  
  [Fix]
  Backport Realtek's 5-patch r8169 RTL8116AF series (v1, the smallest set
  that fixes the issue):
  
    net: phy: realtek: add support for dummy phy
    r8169: move functions forward
    r8169: fix RTL8116af link readiness bug
    r8169: add ltr support for RTL8116af
    r8169: fix RTL8116af can not enter s0idle and c10
  
  These add the dummy PHY, SerDes register handling, LTR/ASPM and
  multi-function D3hot programming for RTL_GIGA_MAC_VER_52 (RTL8116AF).
  
  Because these changes touch RTL_GIGA_MAC_VER_52 broadly, they are gated
  behind a Dell Pro 5 Micro P5M1260 DMI quirk (a per-device rtl8116af_quirk
  flag). Only the matched machine takes the new path; other
  RTL8116AF/VER_52 systems keep the current behavior.
  
  Upstream status: not merged into a released kernel yet. Realtek posted a
  larger phylink-based series (v6, 7 patches) still under review on netdev:
    https://lore.kernel.org/netdev/[email protected]/
  We use the smaller v1 5-patch set as a quirk workaround until that lands.
  The 5-patch set we carry:
    https://lore.kernel.org/netdev/[email protected]/
  
  [Test Plan]
  On Dell Pro 5 Micro P5M1260:
  1. Boot the fixed kernel.
  2. Trigger suspend:
     $ sudo rtcwake -m mem -s 20
  3. After resume, check S0ix residency:
     $ sudo cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
     (or: sudo turbostat --show=Pkg%LPI,PkgC10 --quiet sleep 1)
  
  Without patch: slp_s0_residency stays 0; package never reaches C10/s0ix;
  system looks suspended (screen/fan/LED off) but never enters S0ix.
  With patch: slp_s0_residency increments after each suspend; package
  reaches C10/s0ix.
  Repeat 20+ cycles to confirm stability.
  
  [Where problems could occur]
  Could break the r8169 driver on RTL8116AF / RTL_GIGA_MAC_VER_52 systems.
  If the DMI match or the rtl8116af_quirk gating is wrong, the dummy-PHY /
  SerDes / LTR changes could apply to the wrong device or be skipped on the
  target, causing: the link not coming up (dummy PHY not attached), wrong
  link speed reported, or the device failing to reach low-power states on
  other VER_52 boards. The quirk uses an exact DMI product-name match to
  keep the blast radius to the single matched Dell machine; any regression
  is confined to that platform.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160475

Title:
  System cannot enter s0ix suspend on Dell with RTL8116AF ethernet

To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/2160475/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to