Skip to content

Commit

Permalink
r8169: enable ASPM on RTL8106E
Browse files Browse the repository at this point in the history
The Intel SoC was prevented from entering lower idle state because
of RTL8106E's ASPM was not enabled.

So enable ASPM on RTL8106E (chip version 39).
Now the Intel SoC can enter lower idle state, power consumption and
temperature are much lower.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kai-Heng Feng authored and David S. Miller committed Sep 18, 2018
1 parent 9423546 commit 0866cd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -5627,6 +5627,8 @@ static void rtl_hw_start_8402(struct rtl8169_private *tp)

static void rtl_hw_start_8106(struct rtl8169_private *tp)
{
rtl_hw_aspm_clkreq_enable(tp, false);

/* Force LAN exit from ASPM if Rx/Tx are not idle */
RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800);

Expand All @@ -5635,6 +5637,7 @@ static void rtl_hw_start_8106(struct rtl8169_private *tp)
RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN);

rtl_pcie_state_l2l3_enable(tp, false);
rtl_hw_aspm_clkreq_enable(tp, true);
}

static void rtl_hw_start_8101(struct rtl8169_private *tp)
Expand Down

0 comments on commit 0866cd1

Please sign in to comment.