RTL 8111G

BERTRAND Joël joel.bertrand at systella.fr
Tue Nov 15 11:17:17 UTC 2016


	Hello,

	I have installed some months ago a diskless terminal running FreeBSD 
10.x. This workstation contains a MSI H97I AC motherboard and sadly a 
"Realtek® 8111G Gigabit LAN controller".

	With re driver provided by official FreeBSD 10.x kernel, network 
adapter can stop and, as this system is diskless, kernel crashes. I want 
to upgrade this system to FreeBSD 11.x as I have to use wifi adapter 
(Intel Wireless 7260) that is not supported by 10.x.

	I have downloaded the last driver from Realtek (rtl_bsd_drv_v192) and 
I'm unable to build it. Compilation aborts with :

root at pythagore:/usr/src/sys/modules/re # make
Warning: Object directory not changed from original /usr/src/sys/modules/re
cc -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE 
-nostdinc   -I. -I/usr/src/sys -fno-common  -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer  -MD -MP -MF.depend.if_re.o -MTif_re.o 
-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector 
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas 
-Wno-error-tautological-compare -Wno-error-empty-body 
-Wno-error-parentheses-equality -Wno-error-unused-function 
-Wno-error-pointer-sign  -mno-aes -mno-avx  -std=iso9899:1999 -c 
/usr/src/sys/modules/re/../../dev/re/if_re.c -o if_re.o
/usr/src/sys/modules/re/../../dev/re/if_re.c:723:50: error: use of 
undeclared
       identifier 'M_DONTWAIT'
                 sc->re_desc.rx_buf[i] = m_getjcl(M_DONTWAIT, MT_DATA, M_...
                                                  ^
/usr/src/sys/modules/re/../../dev/re/if_re.c:773:37: error: incomplete
       definition of type 'struct ifnet'
         sc->re_rx_desc_buf_sz = (ifp->if_mtu > ETHERMTU) ? ifp->if_mtu: ...
                                  ~~~^
/usr/src/sys/sys/mbuf.h:140:9: note: forward declaration of 'struct ifnet'
         struct ifnet    *rcvif;         /* rcv interface */
                ^
/usr/src/sys/modules/re/../../dev/re/if_re.c:773:63: error: incomplete
       definition of type 'struct ifnet'
         sc->re_rx_desc_buf_sz = (ifp->if_mtu > ETHERMTU) ? ifp->if_mtu: ...
                                                            ~~~^
/usr/src/sys/sys/mbuf.h:140:9: note: forward declaration of 'struct ifnet'
         struct ifnet    *rcvif;         /* rcv interface */
                ^
/usr/src/sys/modules/re/../../dev/re/if_re.c:3085:28: error: implicit
       declaration of function 'if_alloc' is invalid in C99
       [-Werror,-Wimplicit-function-declaration]
         ifp = sc->re_ifp = if_alloc(IFT_ETHER);
...

	Does anyone successfully use this RTL 8111G adapter with in-kernel 
driver ? I have seen that some modifications have been done between 10.X 
and 11 but I'm not sure that they fix bugs I have seen with 10.x.

	Best regards,

	JKB


More information about the freebsd-hackers mailing list