public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support
@ 2026-01-12  2:45 javen
  2026-01-12  2:45 ` [PATCH net-next v1 1/3] r8169: add DASH support for RTL8127AP javen
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: javen @ 2026-01-12  2:45 UTC (permalink / raw)
  To: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	pabeni, horms
  Cc: netdev, linux-kernel, Javen Xu

From: Javen Xu <javen_xu@realsil.com.cn>

This series patch adds dash support for RTL8127AP, LTR support for
RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 and support for
new chip RTL9151AS.

Javen Xu (3):
  r8169: add DASH support for RTL8127AP
  r8169: enable LTR support
  r8169: add support for chip RTL9151AS

 drivers/net/ethernet/realtek/r8169.h      |   3 +-
 drivers/net/ethernet/realtek/r8169_main.c | 130 +++++++++++++++++++++-
 2 files changed, 130 insertions(+), 3 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net-next v1 1/3] r8169: add DASH support for RTL8127AP
  2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
@ 2026-01-12  2:45 ` javen
  2026-01-12  2:45 ` [PATCH net-next v1 2/3] r8169: enable LTR support javen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: javen @ 2026-01-12  2:45 UTC (permalink / raw)
  To: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	pabeni, horms
  Cc: netdev, linux-kernel, Javen Xu

From: Javen Xu <javen_xu@realsil.com.cn>

This adds DASH support for chip RTL8127AP. Its mac version is
RTL_GIGA_MAC_VER_80 and revision id is 0x04. DASH is a standard for
remote management of network device, allowing out-of-band control.

Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
 drivers/net/ethernet/realtek/r8169_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 755083852eef..f9df6aadacce 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -1513,6 +1513,10 @@ static enum rtl_dash_type rtl_get_dash_type(struct rtl8169_private *tp)
 		return RTL_DASH_EP;
 	case RTL_GIGA_MAC_VER_66:
 		return RTL_DASH_25_BP;
+	case RTL_GIGA_MAC_VER_80:
+		return (tp->pci_dev->revision == 0x04)
+			? RTL_DASH_25_BP
+			: RTL_DASH_NONE;
 	default:
 		return RTL_DASH_NONE;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net-next v1 2/3] r8169: enable LTR support
  2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
  2026-01-12  2:45 ` [PATCH net-next v1 1/3] r8169: add DASH support for RTL8127AP javen
@ 2026-01-12  2:45 ` javen
  2026-01-12  2:45 ` [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS javen
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: javen @ 2026-01-12  2:45 UTC (permalink / raw)
  To: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	pabeni, horms
  Cc: netdev, linux-kernel, Javen Xu

From: Javen Xu <javen_xu@realsil.com.cn>

This patch will enable
RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 LTR support.

Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
 drivers/net/ethernet/realtek/r8169_main.c | 98 +++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index f9df6aadacce..9b89bbf67198 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -312,6 +312,15 @@ enum rtl_registers {
 	IBIMR0          = 0xfa,
 	IBISR0          = 0xfb,
 	FuncForceEvent	= 0xfc,
+
+	ALDPS_LTR	= 0xe0a2,
+	LTR_OBFF_LOCK	= 0xe032,
+	LTR_SNOOP	= 0xe034,
+
+#define ALDPS_LTR_EN			BIT(0)
+#define LTR_OBFF_LOCK_EN		BIT(0)
+#define LINK_SPEED_CHANGE_EN		BIT(14)
+#define LTR_SNOOP_EN			GENMASK(15, 14)
 };
 
 enum rtl8168_8101_registers {
@@ -397,6 +406,8 @@ enum rtl8168_registers {
 #define PWM_EN				(1 << 22)
 #define RXDV_GATED_EN			(1 << 19)
 #define EARLY_TALLY_EN			(1 << 16)
+	COMBO_LTR_EXTEND	= 0xb6,
+#define COMBO_LTR_EXTEND_EN	BIT(0)
 };
 
 enum rtl8125_registers {
@@ -2919,6 +2930,92 @@ static void rtl_disable_exit_l1(struct rtl8169_private *tp)
 	}
 }
 
+static void rtl_enable_ltr(struct rtl8169_private *tp)
+{
+	switch (tp->mac_version) {
+	case RTL_GIGA_MAC_VER_80:
+		r8168_mac_ocp_write(tp, 0xcdd0, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_SNOOP, 0x0000, LTR_SNOOP_EN);
+		r8168_mac_ocp_modify(tp, ALDPS_LTR, 0x0000, ALDPS_LTR_EN);
+		r8168_mac_ocp_write(tp, 0xcdd2, 0x8c09);
+		r8168_mac_ocp_write(tp, 0xcdd8, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd4, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdda, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd6, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcddc, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcde8, 0x887a);
+		r8168_mac_ocp_write(tp, 0xcdea, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdec, 0x8c09);
+		r8168_mac_ocp_write(tp, 0xcdee, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf0, 0x8a62);
+		r8168_mac_ocp_write(tp, 0xcdf2, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf4, 0x883e);
+		r8168_mac_ocp_write(tp, 0xcdf6, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf8, 0x8849);
+		r8168_mac_ocp_write(tp, 0xcdfa, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_OBFF_LOCK, 0x0000, LINK_SPEED_CHANGE_EN);
+		break;
+	case RTL_GIGA_MAC_VER_70:
+		r8168_mac_ocp_write(tp, 0xcdd0, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_SNOOP, 0x0000, LTR_SNOOP_EN);
+		r8168_mac_ocp_modify(tp, ALDPS_LTR, 0x0000, ALDPS_LTR_EN);
+		r8168_mac_ocp_write(tp, 0xcdd2, 0x8c09);
+		r8168_mac_ocp_write(tp, 0xcdd8, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd4, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdda, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd6, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcddc, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcde8, 0x887a);
+		r8168_mac_ocp_write(tp, 0xcdea, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdec, 0x8c09);
+		r8168_mac_ocp_write(tp, 0xcdee, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf0, 0x8a62);
+		r8168_mac_ocp_write(tp, 0xcdf2, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf4, 0x883e);
+		r8168_mac_ocp_write(tp, 0xcdf6, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_OBFF_LOCK, 0x0000, LINK_SPEED_CHANGE_EN);
+		break;
+	case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_66:
+		r8168_mac_ocp_write(tp, 0xcdd0, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_SNOOP, 0x0000, LTR_SNOOP_EN);
+		r8168_mac_ocp_modify(tp, ALDPS_LTR, 0x0000, ALDPS_LTR_EN);
+		r8168_mac_ocp_write(tp, 0xcdd2, 0x889c);
+		r8168_mac_ocp_write(tp, 0xcdd8, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd4, 0x8c30);
+		r8168_mac_ocp_write(tp, 0xcdda, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd6, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcddc, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcde8, 0x883e);
+		r8168_mac_ocp_write(tp, 0xcdea, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdec, 0x889c);
+		r8168_mac_ocp_write(tp, 0xcdee, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdf0, 0x8C09);
+		r8168_mac_ocp_write(tp, 0xcdf2, 0x9003);
+		r8168_mac_ocp_modify(tp, LTR_OBFF_LOCK, 0x0000, LINK_SPEED_CHANGE_EN);
+		break;
+	case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
+	case RTL_GIGA_MAC_VER_52:
+		r8168_mac_ocp_modify(tp, ALDPS_LTR, 0x0000, ALDPS_LTR_EN);
+		RTL_W8(tp, COMBO_LTR_EXTEND, RTL_R8(tp, COMBO_LTR_EXTEND) | COMBO_LTR_EXTEND_EN);
+		fallthrough;
+	case RTL_GIGA_MAC_VER_51:
+		r8168_mac_ocp_modify(tp, LTR_SNOOP, 0x0000, LTR_SNOOP_EN);
+		r8168_mac_ocp_write(tp, 0xe02c, 0x1880);
+		r8168_mac_ocp_write(tp, 0xe02e, 0x4880);
+		r8168_mac_ocp_write(tp, 0xcdd8, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdda, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcddc, 0x9003);
+		r8168_mac_ocp_write(tp, 0xcdd2, 0x883c);
+		r8168_mac_ocp_write(tp, 0xcdd4, 0x8c12);
+		r8168_mac_ocp_write(tp, 0xcdd6, 0x9003);
+		break;
+	default:
+		return;
+	}
+	/* chip can trigger LTR */
+	r8168_mac_ocp_modify(tp, LTR_OBFF_LOCK, 0x0003, LTR_OBFF_LOCK_EN);
+}
+
 static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
 {
 	u8 val8;
@@ -2947,6 +3044,7 @@ static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable)
 			break;
 		}
 
+		rtl_enable_ltr(tp);
 		switch (tp->mac_version) {
 		case RTL_GIGA_MAC_VER_46 ... RTL_GIGA_MAC_VER_48:
 		case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_LAST:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
  2026-01-12  2:45 ` [PATCH net-next v1 1/3] r8169: add DASH support for RTL8127AP javen
  2026-01-12  2:45 ` [PATCH net-next v1 2/3] r8169: enable LTR support javen
@ 2026-01-12  2:45 ` javen
  2026-01-12 22:20   ` Heiner Kallweit
  2026-01-13 10:00 ` [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support patchwork-bot+netdevbpf
  2026-01-13 10:01 ` Paolo Abeni
  4 siblings, 1 reply; 13+ messages in thread
From: javen @ 2026-01-12  2:45 UTC (permalink / raw)
  To: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	pabeni, horms
  Cc: netdev, linux-kernel, Javen Xu

From: Javen Xu <javen_xu@realsil.com.cn>

This patch adds support for chip RTL9151AS. Since lacking of Hardware
version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming chips.
rtl_chip_infos_extend is used to store IC information for RTL9151AS and
coming chips. The TxConfig value between RTL9151AS and RTL9151A is 
different.

Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
 drivers/net/ethernet/realtek/r8169.h      |  3 ++-
 drivers/net/ethernet/realtek/r8169_main.c | 28 +++++++++++++++++++++--
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
index 2c1a0c21af8d..f66c279cbee6 100644
--- a/drivers/net/ethernet/realtek/r8169.h
+++ b/drivers/net/ethernet/realtek/r8169.h
@@ -72,7 +72,8 @@ enum mac_version {
 	RTL_GIGA_MAC_VER_70,
 	RTL_GIGA_MAC_VER_80,
 	RTL_GIGA_MAC_NONE,
-	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
+	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
+	RTL_GIGA_MAC_VER_CHECK_EXTEND
 };
 
 struct rtl8169_private;
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 9b89bbf67198..164ad6570059 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -95,8 +95,8 @@
 #define JUMBO_16K	(SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
 
 static const struct rtl_chip_info {
-	u16 mask;
-	u16 val;
+	u32 mask;
+	u32 val;
 	enum mac_version mac_version;
 	const char *name;
 	const char *fw_name;
@@ -205,10 +205,20 @@ static const struct rtl_chip_info {
 	{ 0xfc8, 0x040,	RTL_GIGA_MAC_VER_03, "RTL8110s" },
 	{ 0xfc8, 0x008,	RTL_GIGA_MAC_VER_02, "RTL8169s" },
 
+	/* extend chip version*/
+	{ 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
+
 	/* Catch-all */
 	{ 0x000, 0x000,	RTL_GIGA_MAC_NONE }
 };
 
+static const struct rtl_chip_info rtl_chip_infos_extend[] = {
+	{ 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS", FIRMWARE_9151A_1},
+
+	/* Catch-all */
+	{ 0x00000000, 0x00000000, RTL_GIGA_MAC_NONE }
+};
+
 static const struct pci_device_id rtl8169_pci_tbl[] = {
 	{ PCI_VDEVICE(REALTEK,	0x2502) },
 	{ PCI_VDEVICE(REALTEK,	0x2600) },
@@ -255,6 +265,8 @@ enum rtl_registers {
 	IntrStatus	= 0x3e,
 
 	TxConfig	= 0x40,
+	/* Extend version register */
+	TX_CONFIG_V2	= 0x60b0,
 #define	TXCFG_AUTO_FIFO			(1 << 7)	/* 8111e-vl */
 #define	TXCFG_EMPTY			(1 << 11)	/* 8111e-vl */
 
@@ -2351,6 +2363,15 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
 	.get_eth_ctrl_stats	= rtl8169_get_eth_ctrl_stats,
 };
 
+static const struct rtl_chip_info *rtl8169_get_extend_chip_version(u32 txconfigv2)
+{
+	const struct rtl_chip_info *p = rtl_chip_infos_extend;
+
+	while ((txconfigv2 & p->mask) != p->val)
+		p++;
+	return p;
+}
+
 static const struct rtl_chip_info *rtl8169_get_chip_version(u16 xid, bool gmii)
 {
 	/* Chips combining a 1Gbps MAC with a 100Mbps PHY */
@@ -5543,6 +5564,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	/* Identify chip attached to board */
 	chip = rtl8169_get_chip_version(xid, tp->supports_gmii);
+
+	if (chip->mac_version == RTL_GIGA_MAC_VER_CHECK_EXTEND)
+		chip = rtl8169_get_extend_chip_version(RTL_R32(tp, TX_CONFIG_V2));
 	if (chip->mac_version == RTL_GIGA_MAC_NONE)
 		return dev_err_probe(&pdev->dev, -ENODEV,
 				     "unknown chip XID %03x, contact r8169 maintainers (see MAINTAINERS file)\n",
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-12  2:45 ` [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS javen
@ 2026-01-12 22:20   ` Heiner Kallweit
  2026-01-13  2:18     ` javen
  2026-01-15 10:51     ` Paolo Abeni
  0 siblings, 2 replies; 13+ messages in thread
From: Heiner Kallweit @ 2026-01-12 22:20 UTC (permalink / raw)
  To: javen, nic_swsd, andrew+netdev, davem, edumazet, kuba, pabeni,
	horms
  Cc: netdev, linux-kernel

On 1/12/2026 3:45 AM, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
> 
> This patch adds support for chip RTL9151AS. Since lacking of Hardware
> version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming chips.
> rtl_chip_infos_extend is used to store IC information for RTL9151AS and
> coming chips. The TxConfig value between RTL9151AS and RTL9151A is 
> 
> different.
> 
> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
> ---
>  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
>  drivers/net/ethernet/realtek/r8169_main.c | 28 +++++++++++++++++++++--
>  2 files changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
> index 2c1a0c21af8d..f66c279cbee6 100644
> --- a/drivers/net/ethernet/realtek/r8169.h
> +++ b/drivers/net/ethernet/realtek/r8169.h
> @@ -72,7 +72,8 @@ enum mac_version {
>  	RTL_GIGA_MAC_VER_70,
>  	RTL_GIGA_MAC_VER_80,
>  	RTL_GIGA_MAC_NONE,
> -	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
> +	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
> +	RTL_GIGA_MAC_VER_CHECK_EXTEND
>  };
>  
>  struct rtl8169_private;
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 9b89bbf67198..164ad6570059 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -95,8 +95,8 @@
>  #define JUMBO_16K	(SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
>  
>  static const struct rtl_chip_info {
> -	u16 mask;
> -	u16 val;
> +	u32 mask;
> +	u32 val;
>  	enum mac_version mac_version;
>  	const char *name;
>  	const char *fw_name;
> @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
>  	{ 0xfc8, 0x040,	RTL_GIGA_MAC_VER_03, "RTL8110s" },
>  	{ 0xfc8, 0x008,	RTL_GIGA_MAC_VER_02, "RTL8169s" },
>  
> +	/* extend chip version*/
> +	{ 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
> +
>  	/* Catch-all */
>  	{ 0x000, 0x000,	RTL_GIGA_MAC_NONE }
>  };
>  
> +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
> +	{ 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS", FIRMWARE_9151A_1},
> +

Seems all bits except bit 31 are used for chip detection. However register is
named TX_CONFIG_V2, even though only bit 31 is left for actual tx configuration.
Is the register name misleading, or is the mask incorrect?


> +	/* Catch-all */
> +	{ 0x00000000, 0x00000000, RTL_GIGA_MAC_NONE }
> +};
> +
>  static const struct pci_device_id rtl8169_pci_tbl[] = {
>  	{ PCI_VDEVICE(REALTEK,	0x2502) },
>  	{ PCI_VDEVICE(REALTEK,	0x2600) },
> @@ -255,6 +265,8 @@ enum rtl_registers {
>  	IntrStatus	= 0x3e,
>  
>  	TxConfig	= 0x40,
> +	/* Extend version register */
> +	TX_CONFIG_V2	= 0x60b0,
>  #define	TXCFG_AUTO_FIFO			(1 << 7)	/* 8111e-vl */
>  #define	TXCFG_EMPTY			(1 << 11)	/* 8111e-vl */
>  
> @@ -2351,6 +2363,15 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
>  	.get_eth_ctrl_stats	= rtl8169_get_eth_ctrl_stats,
>  };
>  
> +static const struct rtl_chip_info *rtl8169_get_extend_chip_version(u32 txconfigv2)
> +{
> +	const struct rtl_chip_info *p = rtl_chip_infos_extend;
> +
> +	while ((txconfigv2 & p->mask) != p->val)
> +		p++;
> +	return p;
> +}
> +
>  static const struct rtl_chip_info *rtl8169_get_chip_version(u16 xid, bool gmii)
>  {
>  	/* Chips combining a 1Gbps MAC with a 100Mbps PHY */
> @@ -5543,6 +5564,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	/* Identify chip attached to board */
>  	chip = rtl8169_get_chip_version(xid, tp->supports_gmii);
> +
> +	if (chip->mac_version == RTL_GIGA_MAC_VER_CHECK_EXTEND)
> +		chip = rtl8169_get_extend_chip_version(RTL_R32(tp, TX_CONFIG_V2));
>  	if (chip->mac_version == RTL_GIGA_MAC_NONE)
>  		return dev_err_probe(&pdev->dev, -ENODEV,
>  				     "unknown chip XID %03x, contact r8169 maintainers (see MAINTAINERS file)\n",


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-12 22:20   ` Heiner Kallweit
@ 2026-01-13  2:18     ` javen
  2026-01-15 10:51     ` Paolo Abeni
  1 sibling, 0 replies; 13+ messages in thread
From: javen @ 2026-01-13  2:18 UTC (permalink / raw)
  To: hkallweit1
  Cc: andrew+netdev, davem, edumazet, horms, javen_xu, kuba,
	linux-kernel, netdev, nic_swsd, pabeni

> On 1/12/2026 3:45 AM, javen wrote:
> > From: Javen Xu <javen_xu@realsil.com.cn>
> >
> > This patch adds support for chip RTL9151AS. Since lacking of Hardware
> > version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming
> chips.
> > rtl_chip_infos_extend is used to store IC information for RTL9151AS
> > and coming chips. The TxConfig value between RTL9151AS and RTL9151A is
> >
> > different.
> >
> > Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
> > ---
> >  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
> >  drivers/net/ethernet/realtek/r8169_main.c | 28
> > +++++++++++++++++++++--
> >  2 files changed, 28 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/realtek/r8169.h
> > b/drivers/net/ethernet/realtek/r8169.h
> > index 2c1a0c21af8d..f66c279cbee6 100644
> > --- a/drivers/net/ethernet/realtek/r8169.h
> > +++ b/drivers/net/ethernet/realtek/r8169.h
> > @@ -72,7 +72,8 @@ enum mac_version {
> >       RTL_GIGA_MAC_VER_70,
> >       RTL_GIGA_MAC_VER_80,
> >       RTL_GIGA_MAC_NONE,
> > -     RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
> > +     RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
> > +     RTL_GIGA_MAC_VER_CHECK_EXTEND
> >  };
> >
> >  struct rtl8169_private;
> > diff --git a/drivers/net/ethernet/realtek/r8169_main.c
> > b/drivers/net/ethernet/realtek/r8169_main.c
> > index 9b89bbf67198..164ad6570059 100644
> > --- a/drivers/net/ethernet/realtek/r8169_main.c
> > +++ b/drivers/net/ethernet/realtek/r8169_main.c
> > @@ -95,8 +95,8 @@
> >  #define JUMBO_16K    (SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
> >
> >  static const struct rtl_chip_info {
> > -     u16 mask;
> > -     u16 val;
> > +     u32 mask;
> > +     u32 val;
> >       enum mac_version mac_version;
> >       const char *name;
> >       const char *fw_name;
> > @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
> >       { 0xfc8, 0x040, RTL_GIGA_MAC_VER_03, "RTL8110s" },
> >       { 0xfc8, 0x008, RTL_GIGA_MAC_VER_02, "RTL8169s" },
> >
> > +     /* extend chip version*/
> > +     { 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
> > +
> >       /* Catch-all */
> >       { 0x000, 0x000, RTL_GIGA_MAC_NONE }  };
> >
> > +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
> > +     { 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS",
> > +FIRMWARE_9151A_1},
> > +
> 
> Seems all bits except bit 31 are used for chip detection. However register is
> named TX_CONFIG_V2, even though only bit 31 is left for actual tx
> configuration.
> Is the register name misleading, or is the mask incorrect?
> 

Previously, we used TxConfig for chip detection. But considering that the 
remaining version IDs are limited, we need to extend it. To remain the 
consistency of name, we choose TX_CONFIG_V2 to extend it. Bit 31 is 
reserved and always 0. Only if nic link drop, it will be set to 1.
 
> > +     /* Catch-all */
> > +     { 0x00000000, 0x00000000, RTL_GIGA_MAC_NONE } };
> > +
> >  static const struct pci_device_id rtl8169_pci_tbl[] = {
> >       { PCI_VDEVICE(REALTEK,  0x2502) },
> >       { PCI_VDEVICE(REALTEK,  0x2600) }, @@ -255,6 +265,8 @@ enum
> > rtl_registers {
> >       IntrStatus      = 0x3e,
> >
> >       TxConfig        = 0x40,
> > +     /* Extend version register */
> > +     TX_CONFIG_V2    = 0x60b0,
> >  #define      TXCFG_AUTO_FIFO                 (1 << 7)        /* 8111e-vl */
> >  #define      TXCFG_EMPTY                     (1 << 11)       /* 8111e-vl */
> >
> > @@ -2351,6 +2363,15 @@ static const struct ethtool_ops
> rtl8169_ethtool_ops = {
> >       .get_eth_ctrl_stats     = rtl8169_get_eth_ctrl_stats,
> >  };
> >
> > +static const struct rtl_chip_info
> > +*rtl8169_get_extend_chip_version(u32 txconfigv2) {
> > +     const struct rtl_chip_info *p = rtl_chip_infos_extend;
> > +
> > +     while ((txconfigv2 & p->mask) != p->val)
> > +             p++;
> > +     return p;
> > +}
> > +
> >  static const struct rtl_chip_info *rtl8169_get_chip_version(u16 xid,
> > bool gmii)  {
> >       /* Chips combining a 1Gbps MAC with a 100Mbps PHY */ @@ -5543,6
> > +5564,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct
> > pci_device_id *ent)
> >
> >       /* Identify chip attached to board */
> >       chip = rtl8169_get_chip_version(xid, tp->supports_gmii);
> > +
> > +     if (chip->mac_version == RTL_GIGA_MAC_VER_CHECK_EXTEND)
> > +             chip = rtl8169_get_extend_chip_version(RTL_R32(tp,
> > + TX_CONFIG_V2));
> >       if (chip->mac_version == RTL_GIGA_MAC_NONE)
> >               return dev_err_probe(&pdev->dev, -ENODEV,
> >                                    "unknown chip XID %03x, contact
> > r8169 maintainers (see MAINTAINERS file)\n",

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support
  2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
                   ` (2 preceding siblings ...)
  2026-01-12  2:45 ` [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS javen
@ 2026-01-13 10:00 ` patchwork-bot+netdevbpf
  2026-01-13 10:01 ` Paolo Abeni
  4 siblings, 0 replies; 13+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-13 10:00 UTC (permalink / raw)
  To: javen
  Cc: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	pabeni, horms, netdev, linux-kernel

Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 12 Jan 2026 10:45:38 +0800 you wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
> 
> This series patch adds dash support for RTL8127AP, LTR support for
> RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 and support for
> new chip RTL9151AS.
> 
> Javen Xu (3):
>   r8169: add DASH support for RTL8127AP
>   r8169: enable LTR support
>   r8169: add support for chip RTL9151AS
> 
> [...]

Here is the summary with links:
  - [net-next,v1,1/3] r8169: add DASH support for RTL8127AP
    https://git.kernel.org/netdev/net-next/c/3259d2cf9427
  - [net-next,v1,2/3] r8169: enable LTR support
    https://git.kernel.org/netdev/net-next/c/9ab94a32af70
  - [net-next,v1,3/3] r8169: add support for chip RTL9151AS
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support
  2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
                   ` (3 preceding siblings ...)
  2026-01-13 10:00 ` [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support patchwork-bot+netdevbpf
@ 2026-01-13 10:01 ` Paolo Abeni
  2026-01-13 17:15   ` Heiner Kallweit
  4 siblings, 1 reply; 13+ messages in thread
From: Paolo Abeni @ 2026-01-13 10:01 UTC (permalink / raw)
  To: javen, hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
	horms
  Cc: netdev, linux-kernel

On 1/12/26 3:45 AM, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
> 
> This series patch adds dash support for RTL8127AP, LTR support for
> RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 and support for
> new chip RTL9151AS.
> 
> Javen Xu (3):
>   r8169: add DASH support for RTL8127AP
>   r8169: enable LTR support
>   r8169: add support for chip RTL9151AS
> 
>  drivers/net/ethernet/realtek/r8169.h      |   3 +-
>  drivers/net/ethernet/realtek/r8169_main.c | 130 +++++++++++++++++++++-
>  2 files changed, 130 insertions(+), 3 deletions(-)

Note that you should not have posted this revision with the previous one
still pending:

https://lore.kernel.org/all/20260109070415.1115-3-javen_xu@realsil.com.cn/

I process the patch in order and I applied the above before reaching here.

@Heiner: I'm sorry for the confusion; the patchwork backlog size called
for somewhat urgent action and I thought your doubt for the patches
posted there where solved. Please LMK if a revert is required.

@Javen: please wait for Heiner feedback about an eventual revert before
any further action.

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support
  2026-01-13 10:01 ` Paolo Abeni
@ 2026-01-13 17:15   ` Heiner Kallweit
  0 siblings, 0 replies; 13+ messages in thread
From: Heiner Kallweit @ 2026-01-13 17:15 UTC (permalink / raw)
  To: Paolo Abeni, javen, nic_swsd, andrew+netdev, davem, edumazet,
	kuba, horms
  Cc: netdev, linux-kernel

On 1/13/2026 11:01 AM, Paolo Abeni wrote:
> On 1/12/26 3:45 AM, javen wrote:
>> From: Javen Xu <javen_xu@realsil.com.cn>
>>
>> This series patch adds dash support for RTL8127AP, LTR support for
>> RTL8168FP/RTL8168EP/RTL8168H/RTL8125/RTL8126/RTL8127 and support for
>> new chip RTL9151AS.
>>
>> Javen Xu (3):
>>   r8169: add DASH support for RTL8127AP
>>   r8169: enable LTR support
>>   r8169: add support for chip RTL9151AS
>>
>>  drivers/net/ethernet/realtek/r8169.h      |   3 +-
>>  drivers/net/ethernet/realtek/r8169_main.c | 130 +++++++++++++++++++++-
>>  2 files changed, 130 insertions(+), 3 deletions(-)
> 
> Note that you should not have posted this revision with the previous one
> still pending:
> 
> https://lore.kernel.org/all/20260109070415.1115-3-javen_xu@realsil.com.cn/
> 
> I process the patch in order and I applied the above before reaching here.
> 
> @Heiner: I'm sorry for the confusion; the patchwork backlog size called
> for somewhat urgent action and I thought your doubt for the patches
> posted there where solved. Please LMK if a revert is required.
> 
Patches are fine with me.

> @Javen: please wait for Heiner feedback about an eventual revert before
> any further action.
> 
> Thanks,
> 
> Paolo
> 
Heiner

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-12 22:20   ` Heiner Kallweit
  2026-01-13  2:18     ` javen
@ 2026-01-15 10:51     ` Paolo Abeni
  2026-01-15 20:15       ` Heiner Kallweit
  2026-01-22  1:42       ` 许俊伟
  1 sibling, 2 replies; 13+ messages in thread
From: Paolo Abeni @ 2026-01-15 10:51 UTC (permalink / raw)
  To: Heiner Kallweit, javen
  Cc: netdev, linux-kernel, nic_swsd, andrew+netdev, davem, edumazet,
	kuba, horms

On 1/12/26 11:20 PM, Heiner Kallweit wrote:
> On 1/12/2026 3:45 AM, javen wrote:
>> From: Javen Xu <javen_xu@realsil.com.cn>
>>
>> This patch adds support for chip RTL9151AS. Since lacking of Hardware
>> version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming chips.
>> rtl_chip_infos_extend is used to store IC information for RTL9151AS and
>> coming chips. The TxConfig value between RTL9151AS and RTL9151A is 
>>
>> different.
>>
>> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
>> ---
>>  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
>>  drivers/net/ethernet/realtek/r8169_main.c | 28 +++++++++++++++++++++--
>>  2 files changed, 28 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
>> index 2c1a0c21af8d..f66c279cbee6 100644
>> --- a/drivers/net/ethernet/realtek/r8169.h
>> +++ b/drivers/net/ethernet/realtek/r8169.h
>> @@ -72,7 +72,8 @@ enum mac_version {
>>  	RTL_GIGA_MAC_VER_70,
>>  	RTL_GIGA_MAC_VER_80,
>>  	RTL_GIGA_MAC_NONE,
>> -	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
>> +	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
>> +	RTL_GIGA_MAC_VER_CHECK_EXTEND
>>  };
>>  
>>  struct rtl8169_private;
>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>> index 9b89bbf67198..164ad6570059 100644
>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>> @@ -95,8 +95,8 @@
>>  #define JUMBO_16K	(SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
>>  
>>  static const struct rtl_chip_info {
>> -	u16 mask;
>> -	u16 val;
>> +	u32 mask;
>> +	u32 val;
>>  	enum mac_version mac_version;
>>  	const char *name;
>>  	const char *fw_name;
>> @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
>>  	{ 0xfc8, 0x040,	RTL_GIGA_MAC_VER_03, "RTL8110s" },
>>  	{ 0xfc8, 0x008,	RTL_GIGA_MAC_VER_02, "RTL8169s" },
>>  
>> +	/* extend chip version*/
>> +	{ 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
>> +
>>  	/* Catch-all */
>>  	{ 0x000, 0x000,	RTL_GIGA_MAC_NONE }
>>  };
>>  
>> +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
>> +	{ 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS", FIRMWARE_9151A_1},
>> +
> 
> Seems all bits except bit 31 are used for chip detection. However register is
> named TX_CONFIG_V2, even though only bit 31 is left for actual tx configuration.
> Is the register name misleading, or is the mask incorrect?

@Heiner (double checking to avoid more confusion on my side): are you
fine with the register name? It's unclear to me if you are fine with
just the 2 merged patches or even with this one.

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-15 10:51     ` Paolo Abeni
@ 2026-01-15 20:15       ` Heiner Kallweit
  2026-01-22  1:42       ` 许俊伟
  1 sibling, 0 replies; 13+ messages in thread
From: Heiner Kallweit @ 2026-01-15 20:15 UTC (permalink / raw)
  To: Paolo Abeni, javen
  Cc: netdev, linux-kernel, nic_swsd, andrew+netdev, davem, edumazet,
	kuba, horms

On 1/15/2026 11:51 AM, Paolo Abeni wrote:
> On 1/12/26 11:20 PM, Heiner Kallweit wrote:
>> On 1/12/2026 3:45 AM, javen wrote:
>>> From: Javen Xu <javen_xu@realsil.com.cn>
>>>
>>> This patch adds support for chip RTL9151AS. Since lacking of Hardware
>>> version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming chips.
>>> rtl_chip_infos_extend is used to store IC information for RTL9151AS and
>>> coming chips. The TxConfig value between RTL9151AS and RTL9151A is 
>>>
>>> different.
>>>
>>> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
>>> ---
>>>  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
>>>  drivers/net/ethernet/realtek/r8169_main.c | 28 +++++++++++++++++++++--
>>>  2 files changed, 28 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
>>> index 2c1a0c21af8d..f66c279cbee6 100644
>>> --- a/drivers/net/ethernet/realtek/r8169.h
>>> +++ b/drivers/net/ethernet/realtek/r8169.h
>>> @@ -72,7 +72,8 @@ enum mac_version {
>>>  	RTL_GIGA_MAC_VER_70,
>>>  	RTL_GIGA_MAC_VER_80,
>>>  	RTL_GIGA_MAC_NONE,
>>> -	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
>>> +	RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
>>> +	RTL_GIGA_MAC_VER_CHECK_EXTEND
>>>  };
>>>  
>>>  struct rtl8169_private;
>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>>> index 9b89bbf67198..164ad6570059 100644
>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>> @@ -95,8 +95,8 @@
>>>  #define JUMBO_16K	(SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
>>>  
>>>  static const struct rtl_chip_info {
>>> -	u16 mask;
>>> -	u16 val;
>>> +	u32 mask;
>>> +	u32 val;
>>>  	enum mac_version mac_version;
>>>  	const char *name;
>>>  	const char *fw_name;
>>> @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
>>>  	{ 0xfc8, 0x040,	RTL_GIGA_MAC_VER_03, "RTL8110s" },
>>>  	{ 0xfc8, 0x008,	RTL_GIGA_MAC_VER_02, "RTL8169s" },
>>>  
>>> +	/* extend chip version*/
>>> +	{ 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
>>> +
>>>  	/* Catch-all */
>>>  	{ 0x000, 0x000,	RTL_GIGA_MAC_NONE }
>>>  };
>>>  
>>> +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
>>> +	{ 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS", FIRMWARE_9151A_1},
>>> +
>>
>> Seems all bits except bit 31 are used for chip detection. However register is
>> named TX_CONFIG_V2, even though only bit 31 is left for actual tx configuration.
>> Is the register name misleading, or is the mask incorrect?
> 
> @Heiner (double checking to avoid more confusion on my side): are you
> fine with the register name? It's unclear to me if you are fine with
> just the 2 merged patches or even with this one.
> 

I understand their motivation for the register name, even though I don't find it ideal.
But if their datasheet calls it like this, then ok.

So yes, patch is fine with me.

> Thanks,
> 
> Paolo
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-15 10:51     ` Paolo Abeni
  2026-01-15 20:15       ` Heiner Kallweit
@ 2026-01-22  1:42       ` 许俊伟
  2026-01-24 21:24         ` Heiner Kallweit
  1 sibling, 1 reply; 13+ messages in thread
From: 许俊伟 @ 2026-01-22  1:42 UTC (permalink / raw)
  To: Paolo Abeni, Heiner Kallweit
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	nic_swsd@realtek.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, horms@kernel.org

>On 1/12/26 11:20 PM, Heiner Kallweit wrote:
>> On 1/12/2026 3:45 AM, javen wrote:
>>> From: Javen Xu <javen_xu@realsil.com.cn>
>>>
>>> This patch adds support for chip RTL9151AS. Since lacking of Hardware
>>> version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming
>chips.
>>> rtl_chip_infos_extend is used to store IC information for RTL9151AS
>>> and coming chips. The TxConfig value between RTL9151AS and RTL9151A
>>> is
>>>
>>> different.
>>>
>>> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
>>> ---
>>>  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
>>>  drivers/net/ethernet/realtek/r8169_main.c | 28
>>> +++++++++++++++++++++--
>>>  2 files changed, 28 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/realtek/r8169.h
>>> b/drivers/net/ethernet/realtek/r8169.h
>>> index 2c1a0c21af8d..f66c279cbee6 100644
>>> --- a/drivers/net/ethernet/realtek/r8169.h
>>> +++ b/drivers/net/ethernet/realtek/r8169.h
>>> @@ -72,7 +72,8 @@ enum mac_version {
>>>      RTL_GIGA_MAC_VER_70,
>>>      RTL_GIGA_MAC_VER_80,
>>>      RTL_GIGA_MAC_NONE,
>>> -    RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
>>> +    RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
>>> +    RTL_GIGA_MAC_VER_CHECK_EXTEND
>>>  };
>>>
>>>  struct rtl8169_private;
>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c
>>> b/drivers/net/ethernet/realtek/r8169_main.c
>>> index 9b89bbf67198..164ad6570059 100644
>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>> @@ -95,8 +95,8 @@
>>>  #define JUMBO_16K   (SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
>>>
>>>  static const struct rtl_chip_info {
>>> -    u16 mask;
>>> -    u16 val;
>>> +    u32 mask;
>>> +    u32 val;
>>>      enum mac_version mac_version;
>>>      const char *name;
>>>      const char *fw_name;
>>> @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
>>>      { 0xfc8, 0x040, RTL_GIGA_MAC_VER_03, "RTL8110s" },
>>>      { 0xfc8, 0x008, RTL_GIGA_MAC_VER_02, "RTL8169s" },
>>>
>>> +    /* extend chip version*/
>>> +    { 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
>>> +
>>>      /* Catch-all */
>>>      { 0x000, 0x000, RTL_GIGA_MAC_NONE }  };
>>>
>>> +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
>>> +    { 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS",
>>> +FIRMWARE_9151A_1},
>>> +
>>
>> Seems all bits except bit 31 are used for chip detection. However
>> register is named TX_CONFIG_V2, even though only bit 31 is left for actual tx
>configuration.
>> Is the register name misleading, or is the mask incorrect?
>
>@Heiner (double checking to avoid more confusion on my side): are you fine
>with the register name? It's unclear to me if you are fine with just the 2
>merged patches or even with this one.
>
>Thanks,
>
>Paolo

Hi, Paolo & Heiner

It appears that this patch has not been accepted yet. Should I resubmit it as a 
separate  patch?

Thank,
Javen Xu

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS
  2026-01-22  1:42       ` 许俊伟
@ 2026-01-24 21:24         ` Heiner Kallweit
  0 siblings, 0 replies; 13+ messages in thread
From: Heiner Kallweit @ 2026-01-24 21:24 UTC (permalink / raw)
  To: 许俊伟, Paolo Abeni
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	nic_swsd@realtek.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, horms@kernel.org

On 1/22/2026 2:42 AM, 许俊伟 wrote:
>> On 1/12/26 11:20 PM, Heiner Kallweit wrote:
>>> On 1/12/2026 3:45 AM, javen wrote:
>>>> From: Javen Xu <javen_xu@realsil.com.cn>
>>>>
>>>> This patch adds support for chip RTL9151AS. Since lacking of Hardware
>>>> version IDs, we use TX_CONFIG_V2 to recognize RTL9151AS and coming
>> chips.
>>>> rtl_chip_infos_extend is used to store IC information for RTL9151AS
>>>> and coming chips. The TxConfig value between RTL9151AS and RTL9151A
>>>> is
>>>>
>>>> different.
>>>>
>>>> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
>>>> ---
>>>>  drivers/net/ethernet/realtek/r8169.h      |  3 ++-
>>>>  drivers/net/ethernet/realtek/r8169_main.c | 28
>>>> +++++++++++++++++++++--
>>>>  2 files changed, 28 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/net/ethernet/realtek/r8169.h
>>>> b/drivers/net/ethernet/realtek/r8169.h
>>>> index 2c1a0c21af8d..f66c279cbee6 100644
>>>> --- a/drivers/net/ethernet/realtek/r8169.h
>>>> +++ b/drivers/net/ethernet/realtek/r8169.h
>>>> @@ -72,7 +72,8 @@ enum mac_version {
>>>>      RTL_GIGA_MAC_VER_70,
>>>>      RTL_GIGA_MAC_VER_80,
>>>>      RTL_GIGA_MAC_NONE,
>>>> -    RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1
>>>> +    RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1,
>>>> +    RTL_GIGA_MAC_VER_CHECK_EXTEND
>>>>  };
>>>>
>>>>  struct rtl8169_private;
>>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c
>>>> b/drivers/net/ethernet/realtek/r8169_main.c
>>>> index 9b89bbf67198..164ad6570059 100644
>>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>>> @@ -95,8 +95,8 @@
>>>>  #define JUMBO_16K   (SZ_16K - VLAN_ETH_HLEN - ETH_FCS_LEN)
>>>>
>>>>  static const struct rtl_chip_info {
>>>> -    u16 mask;
>>>> -    u16 val;
>>>> +    u32 mask;
>>>> +    u32 val;
>>>>      enum mac_version mac_version;
>>>>      const char *name;
>>>>      const char *fw_name;
>>>> @@ -205,10 +205,20 @@ static const struct rtl_chip_info {
>>>>      { 0xfc8, 0x040, RTL_GIGA_MAC_VER_03, "RTL8110s" },
>>>>      { 0xfc8, 0x008, RTL_GIGA_MAC_VER_02, "RTL8169s" },
>>>>
>>>> +    /* extend chip version*/
>>>> +    { 0x7cf, 0x7c8, RTL_GIGA_MAC_VER_CHECK_EXTEND },
>>>> +
>>>>      /* Catch-all */
>>>>      { 0x000, 0x000, RTL_GIGA_MAC_NONE }  };
>>>>
>>>> +static const struct rtl_chip_info rtl_chip_infos_extend[] = {
>>>> +    { 0x7fffffff, 0x00000000, RTL_GIGA_MAC_VER_64, "RTL9151AS",
>>>> +FIRMWARE_9151A_1},
>>>> +
>>>
>>> Seems all bits except bit 31 are used for chip detection. However
>>> register is named TX_CONFIG_V2, even though only bit 31 is left for actual tx
>> configuration.
>>> Is the register name misleading, or is the mask incorrect?
>>
>> @Heiner (double checking to avoid more confusion on my side): are you fine
>> with the register name? It's unclear to me if you are fine with just the 2
>> merged patches or even with this one.
>>
>> Thanks,
>>
>> Paolo
> 
> Hi, Paolo & Heiner
> 
> It appears that this patch has not been accepted yet. Should I resubmit it as a 
> separate  patch?
> 
I will slightly extend your patch to display the new extended XID properly
in places where the XID is printed, and submit it on your behalf.

> Thank,
> Javen Xu

Heiner

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-24 21:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12  2:45 [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support javen
2026-01-12  2:45 ` [PATCH net-next v1 1/3] r8169: add DASH support for RTL8127AP javen
2026-01-12  2:45 ` [PATCH net-next v1 2/3] r8169: enable LTR support javen
2026-01-12  2:45 ` [PATCH net-next v1 3/3] r8169: add support for chip RTL9151AS javen
2026-01-12 22:20   ` Heiner Kallweit
2026-01-13  2:18     ` javen
2026-01-15 10:51     ` Paolo Abeni
2026-01-15 20:15       ` Heiner Kallweit
2026-01-22  1:42       ` 许俊伟
2026-01-24 21:24         ` Heiner Kallweit
2026-01-13 10:00 ` [PATCH net-next v1 0/3] r8169: add dash/LTR/RTL9151AS support patchwork-bot+netdevbpf
2026-01-13 10:01 ` Paolo Abeni
2026-01-13 17:15   ` Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox