FreeBSD 以太网网卡驱动程序无法识别

FreeBSD 以太网网卡驱动程序无法识别

英特尔主板 GA-H61N-D2V

$ pciconf -l -v
re0@pci0:1:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet

FreeBSD 8.2 发布

# uname -a
FreeBSD qb91.anybots.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     [email protected]:/usr/obj/usr/src/sys/GENERIC  i386

内核消息

re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbdff000-0xfbdfffff,0xfbdf8000-0xfbdfbfff irq 16 at device 0.0 on pci1
re0: Using 1 MSI messages
re0: Chip rev. 0x2c800000
re0: MAC rev. 0x00000000
re0: Unknown H/W revision: 0x2c800000

...开火时ifconfigre0不会出现。

不幸的是升级 FreeBSD 不是一个选择,我必须坚持使用 8.2 RELEASE。

我该如何排查/修复此问题?

更新 - 编译新驱动程序

按照此步骤操作线

在 FreeBSD 8.2 RELEASE 虚拟机上,我重新编译了内核。然后我收集if_re.ko并将if_re.ko.symbols它们复制到文件夹中有问题的机器上/boot/kernel/

重启后问题依然存在。

更新 - LOADER.CONF

加入if_re_load="YES"/boot/loader.conf

# kldstat
Id Refs Address    Size     Name
 1   43 0xc0400000 bd97b4   kernel
 2    1 0xc0fda000 1126c    if_run.ko
 3    1 0xc0fec000 4be0     umodem.ko
 4    1 0xc0ff1000 e618     snd_uaudio.ko
 5    3 0xc1000000 56794    sound.ko
 6    1 0xc1057000 2c38     coretemp.ko
 7    1 0xc105a000 c108     ahci.ko
 8    1 0xc1067000 4c04     cuse4bsd.ko
 9    1 0xc106c000 3ce0     runfw.ko
10    1 0xc1070000 3c98     uanypkt.ko
11    1 0xc1074000 69d4     usie.ko
12    1 0xc4f0f000 9000     tmpfs.ko
13    1 0xc51b0000 26000    linux.ko

还是没有运气。

还尝试手动加载:

# kldload -v /boot/kernel/if_re.ko
kldload: can't load /boot/kernel/if_re.ko: File exists

不确定这意味着什么,我想这意味着它已加载(?)

# kldstat -v | grep ko
 2    1 0xc0fda000 1126c    if_run.ko (/boot/kernel/if_run.ko)
 3    1 0xc0fec000 4be0     umodem.ko (/boot/kernel/umodem.ko)
 4    1 0xc0ff1000 e618     snd_uaudio.ko (/boot/kernel/snd_uaudio.ko)
 5    3 0xc1000000 56794    sound.ko (/boot/kernel/sound.ko)
 6    1 0xc1057000 2c38     coretemp.ko (/boot/kernel/coretemp.ko)
 7    1 0xc105a000 c108     ahci.ko (/boot/kernel/ahci.ko)
 8    1 0xc1067000 4c04     cuse4bsd.ko (/boot/modules/cuse4bsd.ko)
 9    1 0xc106c000 3ce0     runfw.ko (/boot/kernel/runfw.ko)
10    1 0xc1070000 3c98     uanypkt.ko (/boot/modules/uanypkt.ko)
11    1 0xc1074000 69d4     usie.ko (/boot/modules/usie.ko)
12    1 0xc4f0f000 9000     tmpfs.ko (/boot/kernel/tmpfs.ko)
13    1 0xc51b0000 26000    linux.ko (/boot/kernel/linux.ko)

更新 - re0 未启动

if_re.ko我最终复制了整个kernel目录,而不是仅复制文件

现在适配器已启动并获得分配的地址

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 74:d4:35:12:ce:d6
    inet 10.10.99.115 netmask 0xffff0000 broadcast 10.10.255.255
    media: Ethernet autoselect (none)
    status: no carrier

但我仍然从内核收到这些消息,这让我有点困扰。看起来 re0 没有被完全识别。

# dmesg | grep re0
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbdff000-0xfbdfffff,0xfbdf8000-0xfbdfbfff irq 16 at device 0.0 on pci1
re0: Using 1 MSI messages
re0: Chip rev. 0x2c800000
re0: MAC rev. 0x00000000
re0: Unknown H/W revision: 0x2c800000
device_attach: re0 attach returned 6
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbdff000-0xfbdfffff,0xfbdf8000-0xfbdfbfff irq 16 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: turning off MSI enable bit.
re0: Chip rev. 0x2c800000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
re0: Ethernet address: 74:d4:35:12:ce:d6
re0: [ITHREAD]
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbdff000-0xfbdfffff,0xfbdf8000-0xfbdfbfff irq 16 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: Chip rev. 0x2c800000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
re0: Ethernet address: 74:d4:35:12:ce:d6
re0: [ITHREAD]
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfbdff000-0xfbdfffff,0xfbdf8000-0xfbdfbfff irq 16 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: Chip rev. 0x2c800000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
re0: Ethernet address: 74:d4:35:12:ce:d6
re0: [ITHREAD]

答案1

re我认为8.2-RELEASE 或更早版本中的库存驱动程序不支持芯片组的此修订版。您可以获取驱动程序的向后移植版本并重建内核以包含它。快速搜索 FreeBSD 邮件列表档案会发现这一点线,其中包含更新的驱动程序文件的链接。如果您需要重建内核的指导,第9章FreeBSD 手册中的内容是一个很好的起点。

相关内容