This is my first post to the mailing list and my first time customizing 
the kernel. I apologize in advance for mistakes I make.

I have a Lenovo ThinkCenter M75n Nano IoT computer. It uses the Realtek 
RTL8111FP-CG Ethernet controller, as do other similar small form factor 
computers. OpenBSD 6.9 does not recognize the controller. dmesg shows:

re0 at pci2 dev 0 function 1 "Realtek 8168" rev 0x1a: unknown ASIC 
(0x5480), msi, address 00:00:00:00

Studying similar posts in the mailing lists, I made the changes shown
in the diffs below, compiled the kernel, and now OpenBSD recognizes 
and can use the Ethernet.

Would someone be willing to review and/or commit this? Thank you!

 
Index: re.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/re.c,v
retrieving revision 1.208
diff -u -p -u -r1.208 re.c
--- re.c        12 Dec 2020 11:48:52 -0000      1.208
+++ re.c        6 May 2021 16:13:43 -0000
@@ -248,6 +248,7 @@ static const struct re_revision {
        { RL_HWREV_8168E,       "RTL8168E/8111E" },
        { RL_HWREV_8168E_VL,    "RTL8168E/8111E-VL" },
        { RL_HWREV_8168EP,      "RTL8168EP/8111EP" },
+       { RL_HWREV_8168FP,      "RTL8168FP/8111FP" },
        { RL_HWREV_8169,        "RTL8169" },
        { RL_HWREV_8169_8110SB, "RTL8169/8110SB" },
        { RL_HWREV_8169_8110SBL, "RTL8169SBL" },
@@ -754,6 +755,7 @@ re_attach(struct rl_softc *sc, const cha
                sc->rl_max_mtu = RL_JUMBO_MTU_9K;
                break;
        case RL_HWREV_8168EP:
+       case RL_HWREV_8168FP:
        case RL_HWREV_8168G:
        case RL_HWREV_8168GU:
        case RL_HWREV_8168H:
Index: rtl81x9reg.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.101
diff -u -p -u -r1.101 rtl81x9reg.h
--- rtl81x9reg.h        11 Apr 2018 08:02:18 -0000      1.101
+++ rtl81x9reg.h        6 May 2021 16:13:43 -0000
@@ -210,6 +210,7 @@
 #define RL_HWREV_8168EP                0x50000000
 #define RL_HWREV_8168GU                0x50800000
 #define RL_HWREV_8168H         0x54000000
+#define RL_HWREV_8168FP                0x54800000
 #define RL_HWREV_8411B         0x5c800000      
 #define RL_HWREV_8139          0x60000000
 #define RL_HWREV_8139A         0x70000000

Reply via email to