Skip to content

Commit ae49841

Browse files
committed
Merge branch 'r8169-RTL8168H-PHY-fixes'
Chunhao Lin says: ==================== r8169: Update RTL8168H PHY parameters Fix typo in setting PHY parameter and update the way of reading PHY register "rg_saw_cnt". ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 032c5e8 + 5849333 commit ae49841

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+2
-2
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,7 +3947,7 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp)
39473947
data = (ioffset_p3<<12)|(ioffset_p2<<8)|(ioffset_p1<<4)|(ioffset_p0);
39483948

39493949
if ((ioffset_p3 != 0x0f) || (ioffset_p2 != 0x0f) ||
3950-
(ioffset_p1 != 0x0f) || (ioffset_p0 == 0x0f)) {
3950+
(ioffset_p1 != 0x0f) || (ioffset_p0 != 0x0f)) {
39513951
rtl_writephy(tp, 0x1f, 0x0bcf);
39523952
rtl_writephy(tp, 0x16, data);
39533953
rtl_writephy(tp, 0x1f, 0x0000);
@@ -6136,7 +6136,7 @@ static void rtl_hw_start_8168h_1(struct rtl8169_private *tp)
61366136
rtl_pcie_state_l2l3_enable(tp, false);
61376137

61386138
rtl_writephy(tp, 0x1f, 0x0c42);
6139-
rg_saw_cnt = rtl_readphy(tp, 0x13);
6139+
rg_saw_cnt = (rtl_readphy(tp, 0x13) & 0x3fff);
61406140
rtl_writephy(tp, 0x1f, 0x0000);
61416141
if (rg_saw_cnt > 0) {
61426142
u16 sw_cnt_1ms_ini;

0 commit comments

Comments
 (0)