Skip to contentSkip to conversation

r8169: add constant EnAnaPLL

PATCH Applied Heiner Kallweit 2 participants 2 messages Jan 8, 2020 – Jan 9, 2020

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: add constant EnAnaPLL

Use constant EnAnaPLL for bit 14 as in vendor driver. The vendor driver sets this bit for chip version 02 only, but I'm not aware of any issues, so better leave it as it is.
In addition remove the useless debug message.

---
 drivers/net/ethernet/realtek/r8169_main.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +3 -5
index 0161d839f..9c61ce294 100644
@@ -492,6 +492,7 @@ enum rtl_register_content {
 	/* CPlusCmd p.31 */
 	EnableBist	= (1 << 15),	// 8168 8101
 	Mac_dbgo_oe	= (1 << 14),	// 8168 8101
+	EnAnaPLL	= (1 << 14),	// 8169
 	Normal_mode	= (1 << 13),	// unused
 	Force_half_dup	= (1 << 12),	// 8168 8101
 	Force_rxflow_en	= (1 << 11),	// 8168 8101
@@ -5212,11 +5213,8 @@ static void rtl_hw_start_8169(struct rtl8169_private *tp)
 	tp->cp_cmd |= PCIMulRW;
 
 	if (tp->mac_version == RTL_GIGA_MAC_VER_02 ||
-	    tp->mac_version == RTL_GIGA_MAC_VER_03) {
-		netif_dbg(tp, drv, tp->dev,
-			  "Set MAC Reg C+CR Offset 0xe0. Bit 3 and Bit 14 MUST be 1\n");
-		tp->cp_cmd |= (1 << 14);
-	}
+	    tp->mac_version == RTL_GIGA_MAC_VER_03)
+		tp->cp_cmd |= EnAnaPLL;
 
 	RTL_W16(tp, CPlusCmd, tp->cp_cmd);
 
Signature · 1 line
2.24.1
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Wed, 8 Jan 2020 07:36:08 +0100

Quoted 6 lines

Use constant EnAnaPLL for bit 14 as in vendor driver. The vendor driver sets this bit for chip version 02 only, but I'm not aware of any issues, so better leave it as it is.
In addition remove the useless debug message.

Applied.