Skip to content

Commit 9423546

Browse files
khfengdavem330
authored andcommitted
r8169: Align ASPM/CLKREQ setting function with vendor driver
There's a small delay after setting ASPM in vendor drivers, r8101 and r8168. In addition, those drivers enable ASPM before ClkReq, also change that to align with vendor driver. I haven't seen anything bad becasue of this, but I think it's better to keep in sync with vendor driver. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3275b4d commit 9423546

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+3
-1
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4775,12 +4775,14 @@ static void rtl_pcie_state_l2l3_enable(struct rtl8169_private *tp, bool enable)
47754775
static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
47764776
{
47774777
if (enable) {
4778-
RTL_W8(tp, Config2, RTL_R8(tp, Config2) | ClkReqEn);
47794778
RTL_W8(tp, Config5, RTL_R8(tp, Config5) | ASPM_en);
4779+
RTL_W8(tp, Config2, RTL_R8(tp, Config2) | ClkReqEn);
47804780
} else {
47814781
RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~ClkReqEn);
47824782
RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~ASPM_en);
47834783
}
4784+
4785+
udelay(10);
47844786
}
47854787

47864788
static void rtl_hw_start_8168bb(struct rtl8169_private *tp)

0 commit comments

Comments
 (0)