Solved if_re for RTL8125- module loads, no device output

OS: FreeBSD14-Current
Kernel: Custom
Arch: AMD64

Package: realtek-re-kmod-198.00.pkg

Code:
device miibus
device if_re

are commented out within my kernel conf,
otherwise I would get a "pci/if_re" and "re/miibus" already loaded message when trying to use the new kmod

Code:
if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

both exist within boot/loader.conf

Code:
kldload if_re

No output, none in dmesg

Code:
none1@pci:0:6:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2488 subvendor=0x1043 subdevice=0x87d7
vendor: Realtek Smiconductr Co., Ltd
device: RTL8125 2.5 GbE Controller
class: network
subclass: ethernet

pciconf -lv

Code:
pci5: <network> at device 0.0 (no driver attached)
pci6: <network, ehternet> at device 0.0 (no driver attached)

dmesg | grep network

What's going wrong here?
 
Thanks. I was chancing it. With the limited internet, it wasn't possible to get on to the mail-list property.

Fixed the issue anyway. I wasn't aware that the file if_re.ko was still existing in /boot/modules
Removing that, and reinstalling I now have network.

Hence this post.

- solved.
 
Makes sense, as this was the GENERIC build at first.
I hadn't taken in to account that pre existing kernel modules would still exist prior and that those get loaded before anything in the /boot/modules directory.

There was no indication of that this extension file had been loaded.
 
The if_re_name tells it to load the module from the net/realtek-re-kmod port/package.
Right, however due to the file existing in the first place as mentioned by yourself, regardless if it statically linked of not. Installing the realtek-re-kmod package installs the module in to /boot/modules. But kldload loads the module from /kernel folder. And which if that, one of the same exists in both directories the kernel module will be loaded first. I wasn't aware of this.

As this is a new motherboard as of yesterday, I have never needed to use the realtek module. This lead me to believe that it was loading the module from the /module directory. I had no awareness that this was even installed on my system, and even that when kldstat pronounced it was loaded gave no indication as expected.

I was lucky enough to do a "locate" and discover that this file existed in the /kernel. All is good now.
 
But kldload loads the module from /kernel folder.
A 'bare' kldload(8), yes. But the loader.conf explicitly tells it to load it from /boot/modules/if_re.ko. Which you could also do on the commandline: kldload /boot/modules/if_re.ko.

Code:
     If a bare filename is requested it will only be loaded if it is found
     within the module path as defined by the sysctl kern.module_path.  To
     load a module from the current directory it must be specified as a full
     or relative path.  The kldload utility will warn if a module is requested
     as a bare filename and is present in the current directory.
kldload(8).
 
A 'blank' kldload(8), yes. But the loader.conf explicitly tells it to load it from /boot/modules/if_re.ko. Which you could also do on the commandline: kldload /boot/modules/if_re.ko.

With the path defined, it still didn't load that extension from the path. As per my loader.conf

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

It wasn't until I completed eradicated the other file it loaded successfully.
Handy to know about you can feed it the whole path.
 
Back
Top