git: acbf7498f5e1 - main - rge: log silicon revision during attach
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Feb 2026 18:08:11 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=acbf7498f5e11b00ffcd6c12bdb8bd1eddeb6d7f
commit acbf7498f5e11b00ffcd6c12bdb8bd1eddeb6d7f
Author: Christos Longros <chris.longros@gmail.com>
AuthorDate: 2026-02-22 18:06:50 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2026-02-22 18:07:37 +0000
rge: log silicon revision during attach
The initial import from OpenBSD contained chip revision printf() calls
commented out, as OpenBSD's bare printf() style does not translate to
FreeBSD's device_printf() idiom. The result is that users cannot
distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via
dmesg alone, even though all variants show as '<RTL8125>' from the PCI
probe string.
Add proper device_printf() calls including the raw hwrev value,
consistent with how re(4) reports chip revisions.
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Reviewed by: zlei, imp, adrian
Differential Revision: https://reviews.freebsd.org/D55402
---
sys/dev/rge/if_rge.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c
index dfa6cd1325e5..b2f1311b4c87 100644
--- a/sys/dev/rge/if_rge.c
+++ b/sys/dev/rge/if_rge.c
@@ -413,31 +413,31 @@ rge_attach(device_t dev)
switch (hwrev) {
case 0x60900000:
sc->rge_type = MAC_R25;
-// device_printf(dev, "RTL8125\n");
+ device_printf(dev, "chip rev: RTL8125 (0x%08x)\n", hwrev);
break;
case 0x64100000:
sc->rge_type = MAC_R25B;
-// device_printf(dev, "RTL8125B\n");
+ device_printf(dev, "chip rev: RTL8125B (0x%08x)\n", hwrev);
break;
case 0x64900000:
sc->rge_type = MAC_R26_1;
-// device_printf(dev, "RTL8126_1\n");
+ device_printf(dev, "chip rev: RTL8126_1 (0x%08x)\n", hwrev);
break;
case 0x64a00000:
sc->rge_type = MAC_R26_2;
-// device_printf(dev, "RTL8126_2\n");
+ device_printf(dev, "chip rev: RTL8126_2 (0x%08x)\n", hwrev);
break;
case 0x68800000:
sc->rge_type = MAC_R25D_1;
-// device_printf(dev, "RTL8125D_1\n");
+ device_printf(dev, "chip rev: RTL8125D_1 (0x%08x)\n", hwrev);
break;
case 0x68900000:
sc->rge_type = MAC_R25D_2;
-// device_printf(dev, "RTL8125D_2\n");
+ device_printf(dev, "chip rev: RTL8125D_2 (0x%08x)\n", hwrev);
break;
case 0x6c900000:
sc->rge_type = MAC_R27;
-// device_printf(dev, "RTL8127\n");
+ device_printf(dev, "chip rev: RTL8127 (0x%08x)\n", hwrev);
break;
default:
RGE_PRINT_ERROR(sc, "unknown version 0x%08x\n", hwrev);