Skip to content

Commit

Permalink
r8169:Update the way of reading RTL8168H PHY register "rg_saw_cnt"
Browse files Browse the repository at this point in the history
The vlaue of RTL8168H PHY register "rg_saw_cnt" only valid from bit0 to bit13.
When read this register, add bitwise-anding its value with 0x3fff.

Signed-off-by: Chunhao Lin <hau@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chun-Hao Lin authored and David S. Miller committed Dec 28, 2015
1 parent e2e2788 commit 5849333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -6136,7 +6136,7 @@ static void rtl_hw_start_8168h_1(struct rtl8169_private *tp)
rtl_pcie_state_l2l3_enable(tp, false);

rtl_writephy(tp, 0x1f, 0x0c42);
rg_saw_cnt = rtl_readphy(tp, 0x13);
rg_saw_cnt = (rtl_readphy(tp, 0x13) & 0x3fff);
rtl_writephy(tp, 0x1f, 0x0000);
if (rg_saw_cnt > 0) {
u16 sw_cnt_1ms_ini;
Expand Down

0 comments on commit 5849333

Please sign in to comment.