Thomas Mueller
2013-Sep-22 20:28 UTC
dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
I've been unable to establish Internet connection from a new computer with Realtek 811E Ethernet despite this Ethernet chip working on another computer with another MSI motherboard. Problem motherboard is MSI Z77 MPOWER. Older, by two years, motherboard is MSI Z68MA-ED55(B3). uname -a shows FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64 I get the same problem with FreeBSD 9.1_STABLE i386. These are USB-stick installations. I was able to connect to the Internet with (MSI) Winki 3 (Linux-based), included on a DVD included in the motherboard package. After nothing but frustration trying to boot USB-stick installations of NetBSD 6.1-STABLE and HEAD (i386), I successfully booted NetBSD-HEAD amd64 from early last May, and "dhclient re0" was successful, whereupon I downloaded, by cvs, the HEAD source tree and pkgsrc tree. This proves or strongly suggests the Ethernet chip is healthy. Anything I can do (at loader prompt or loader.conf?) to make this Ethernet work in FreeBSD? I could update NetBSD-HEAD from source, update the packages through pkgsrc, and build subversion, then checkout the FreeBSD-HEAD source tree, ports and doc trees too, and build FreeBSD-HEAD from source on hard drive using USB-stick installation of FreeBSD 9.2 (prerelease or release). Related part of /var/run/dmesg.boot is re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0xe000-0xe0f f mem 0xf7d04000-0xf7d04fff,0xf7d00000-0xf7d03fff irq 17 at device 0.0 on pci2 re0: Using 1 MSI-X message re0: Chip rev. 0x2c800000 re0: MAC rev. 0x00000000 miibus0: <MII bus> on re0 rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX , 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX- master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Ethernet address: d4:3d:7e:97:17:e2 Log of "dhclient re0" was DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 3 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 3 DHCPOFFER from 192.168.1.1 DHCPREQUEST on re0 to 255.255.255.255 port 67 DHCPREQUEST on re0 to 255.255.255.255 port 67 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 6 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 13 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 14 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 17 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 11 No DHCPOFFERS received. No working leases in persistent database - sleeping. Somewhat later I got Memory modified after free 0xfffffe0011546800(2048) val=977e3dd 4 @ 0xfffffe0011546800 Memory modified after free 0xfffffe001153b800(2048) val=ffffffff @ 0xfffffe00115 3b800 Memory modified after free 0xfffffe0011524800(2048) val=977e3dd4 @ 0xfffffe00115 24800 VESA: set_mode(): 24(18) -> 24(18) Memory modified after free 0xfffffe0011594000(2048) val=977e3dd4 @ 0xfffffe00115 94000 In one case, when I went to bed on this, hours later the system crashed and went into the debugger (db>), where I was rather lost, couldn't kill dhclient, after some time types "reboot". Should I have posted this to a different list (hardware, questions?)? I would like to find if FreeBSD HEAD (10.0 alphas) would do better. Also, because of nearness of 10.0-RELEASE, I would rather go this track than 9.2 and then update; I already have 9.2 prerelease on other computer. Motherboard also has Atheros Wi-Fi (Atheros AR9271 802.11n), and I also have a USB stick-type WLAN adapter (Hiro Inc H50191, Realtek RTL8191SU 802.11n chip). Tom
Thomas Laus
2013-Sep-23 12:52 UTC
dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
> Related part of /var/run/dmesg.boot is > > re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port > 0xe000-0xe0f f mem 0xf7d04000-0xf7d04fff,0xf7d00000-0xf7d03fff irq 17 at > device 0.0 on pci2 re0: Using 1 MSI-X message re0: Chip rev. 0x2c800000 re0: > MAC rev. 0x00000000 miibus0: <MII bus> on re0 rgephy0: <RTL8169S/8110S/8211 > 1000BASE-T media interface> PHY 1 on miibus0 rgephy0: none, 10baseT, > 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX , 100baseTX-FDX-flow, > 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX- master, > 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Ethernet > address: d4:3d:7e:97:17:e2 >Thomas: That NIC chip works for me and gets it's address information using DHCP. Aug 31 16:09:13 mail kernel: FreeBSD 9.2-PRERELEASE #1: Sat Aug 31 12:13:51 EDT 2013 Aug 31 16:09:13 mail kernel: re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0x2000-0x20ff mem 0xf0004000-0xf0004fff,0xf0000000-0xf0003fff irq 16 at device 0.0 on pci1 Aug 31 16:09:13 mail kernel: re0: Using 1 MSI-X message Aug 31 16:09:13 mail kernel: re0: Chip rev. 0x28000000 Aug 31 16:09:13 mail kernel: re0: MAC rev. 0x00000000 Aug 31 16:09:13 mail kernel: miibus0: <MII bus> on re0 Aug 31 16:09:13 mail kernel: rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0 Aug 31 16:09:13 mail kernel: rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master,1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow Aug 31 16:09:13 mail kernel: re0: Ethernet address: 70:71:bc:18:1b:97 Tom -- Public Keys: PGP KeyID = 0x5F22FDC1 GnuPG KeyID = 0x620836CF
Torfinn Ingolfsen
2013-Sep-23 18:16 UTC
dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
On Sun, 22 Sep 2013 20:28:08 +0000 "Thomas Mueller" <mueller6724 at bellsouth.net> wrote:> I've been unable to establish Internet connection from a new computer with Realtek 811E Ethernet despite this Ethernet chip working on another computer with another MSI motherboard.In additiin to the information you have already provided, you should also provide relevant output from pciconf, like so: root at kg-core1# pciconf -lv | grep -A 4 re0 re0 at pci0:2:0:0: class=0x020000 card=0x84321043 chip=0x816810ec rev=0x06 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' class = network subclass = ethernet (substitute the name of your interface for "re0") and also ifconfig output like this: root at kg-core1# ifconfig re0 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> ether 50:46:5d:8b:a2:ea inet 10.1.150.50 netmask 0xffff0000 broadcast 10.1.255.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active (again, substitute the name of your interface for "re0") As far as fault-finding "tricks" go, here is one that have helped me on several occasions in the past: before doing anything with a network interface (in other words, before starting DHCP), try doing a 'ifconfig <interface> up' for example ifconfig re0 up After that, use the interface normally. If it works, you have found a bug related to the driver and the specific hardware revsion of you card. Create a PR for it. HTH -- Torfinn Ingolfsen <torfinn.ingolfsen at getmail.no>
Yonghyeon PYUN
2013-Sep-25 06:36 UTC
dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
On Sun, Sep 22, 2013 at 08:28:08PM +0000, Thomas Mueller wrote:> I've been unable to establish Internet connection from a new computer with Realtek 811E Ethernet despite this Ethernet chip working on another computer with another MSI motherboard. > > Problem motherboard is MSI Z77 MPOWER. > > Older, by two years, motherboard is MSI Z68MA-ED55(B3). > > uname -a shows > > FreeBSD amelia2 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #17 r254196: Sun Aug 11 00:36:49 UTC 2013 root at amelia2:/usr/obj/usr/src/sys/SANDY amd64 > > I get the same problem with FreeBSD 9.1_STABLE i386. > > These are USB-stick installations. > > I was able to connect to the Internet with (MSI) Winki 3 (Linux-based), included on a DVD included in the motherboard package. > > After nothing but frustration trying to boot USB-stick installations of NetBSD 6.1-STABLE and HEAD (i386), I successfully booted NetBSD-HEAD amd64 from early last May, and "dhclient re0" was successful, whereupon I downloaded, by cvs, the HEAD source tree and pkgsrc tree. > > This proves or strongly suggests the Ethernet chip is healthy. > > Anything I can do (at loader prompt or loader.conf?) to make this Ethernet work in FreeBSD? > > I could update NetBSD-HEAD from source, update the packages through pkgsrc, and build subversion, then checkout the FreeBSD-HEAD source tree, ports and doc trees too, and build FreeBSD-HEAD from source on hard drive using USB-stick installation of FreeBSD 9.2 (prerelease or release). > > Related part of /var/run/dmesg.boot is > > re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0xe000-0xe0f > f mem 0xf7d04000-0xf7d04fff,0xf7d00000-0xf7d03fff irq 17 at device 0.0 on pci2 > re0: Using 1 MSI-X message > re0: Chip rev. 0x2c800000 > re0: MAC rev. 0x00000000It looks like 8168E-VL. Could you try attached patch and show me the dmesg output(re(4) and rgephy(4) only)? The patch was generated to support 8106E but it will correctly show MAC revision number.> miibus0: <MII bus> on re0 > rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0 > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX > , 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX- > master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow > re0: Ethernet address: d4:3d:7e:97:17:e2 > > > Log of "dhclient re0" was > > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 3 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 3 > DHCPOFFER from 192.168.1.1Driver got a response but it seems it was discarded.> DHCPREQUEST on re0 to 255.255.255.255 port 67 > DHCPREQUEST on re0 to 255.255.255.255 port 67 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 6 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 13 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 14 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 17 > DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 11 > No DHCPOFFERS received. > No working leases in persistent database - sleeping. > > > Somewhat later I got > > Memory modified after free 0xfffffe0011546800(2048) val=977e3dd > 4 @ 0xfffffe0011546800 > Memory modified after free 0xfffffe001153b800(2048) val=ffffffff @ 0xfffffe00115 > 3b800 > Memory modified after free 0xfffffe0011524800(2048) val=977e3dd4 @ 0xfffffe00115 > 24800 > VESA: set_mode(): 24(18) -> 24(18) > Memory modified after free 0xfffffe0011594000(2048) val=977e3dd4 @ 0xfffffe00115 > 94000 >The size(2048) indicates mbuf cluster which in turn means bad things happened in re(4). I have no idea how this can happen though. If you assign static IP addressi to re(4), does the driver works as expected?> > In one case, when I went to bed on this, hours later the system crashed and went into the debugger (db>), where I was rather lost, couldn't kill dhclient, after some time types "reboot". > > Should I have posted this to a different list (hardware, questions?)? > > I would like to find if FreeBSD HEAD (10.0 alphas) would do better. Also, because of nearness of 10.0-RELEASE, I would rather go this track than 9.2 and then update; I already have 9.2 prerelease on other computer. > > Motherboard also has Atheros Wi-Fi (Atheros AR9271 802.11n), and I also have a USB stick-type WLAN adapter (Hiro Inc H50191, Realtek RTL8191SU 802.11n chip). > > Tom-------------- next part -------------- A non-text attachment was scrubbed... Name: re.8106.diff Type: text/x-diff Size: 2188 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20130925/3f2d6bfd/attachment.diff>
Thomas Mueller
2013-Oct-16 08:50 UTC
dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
for MSI Z77 MPOWER motherboard on FreeBSD 10.0-BETA1, from /var/run/dmesg.boot: re0: Using 1 MSI-X message re0: Chip rev. 0x2c800000 re0: MAC rev. 0x00000000 miibus0: <MII bus> on re0 rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Ethernet address: d4:3d:7e:97:17:e2 Ethernet chip data for older motherboard, MSI Z68MA-ED55(B3), FreeBSD 9.2 prerelease amd64, where Realtek 8111E Ethernet works, is re0 at pci0:3:0:0: class=0x020000 card=0x76761462 chip=0x816810ec rev=0x06 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8111/8168B PCI Express Gigabit Ethernet controller' class = network subclass = ethernet When I run " dhclient re0", I can't connect, get DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 7 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 20 DHCPOFFER from 192.168.1.1 DHCPREQUEST on re0 to 255.255.255.255 port 67 DHCPREQUEST on re0 to 255.255.255.255 port 67 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 14 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 18 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 11 DHCPDISCOVER on re0 to 255.255.255.255 port 67 interval 7 No DHCPOFFERS received. No working leases in persistent database - sleeping. uname -a shows FreeBSD amelia4 10.0-BETA1 FreeBSD 10.0-BETA1 #0 r256437: Mon Oct 14 16:44:23 UTC 2013 root@:/usr/obj/usr/src/sys/SANDY10 amd64 I also get "Memory modified..." error message, meaning the system has become unstable, reboot as soon as I get the messages together. My guess is that this is a bug in the Realtek 8111E driver. This Ethernet on MSI Z77 MPOWER motherboard also fails on OpenBSD 5.3 LiveUSB but succeeds on NetBSD-current (6.99.23) amd64 ,and Linux from the System Rescue CD written to USB stick. I had this problem with 9.2 prerelease, so it apparently hasn't been fixed for 10.0. Should I file a PR? Tom
Thomas Mueller
2013-Nov-06 02:36 UTC
dhclient failure with Realtek 8111E Ethernet on new MSI motherboard
from Yonghyeon PYUN: Thomas, would you try attached patch on your system? [-- Attachment #2: re.8168evl.diff --] [-- Type: text/x-diff, Encoding: 7bit, Size: 3.6K --] Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="re.8168evl.diff" Index: sys/dev/re/if_re.c ================================================================== --- sys/dev/re/if_re.c (revision 257422) +++ sys/dev/re/if_re.c (working copy) @@ -295,6 +295,8 @@ static int re_miibus_writereg (device_t, int, int, int); static void re_miibus_statchg (device_t); +static void re_eri_write (struct rl_softc *, bus_size_t, uint32_t, int); + static void re_set_jumbo (struct rl_softc *, int); static void re_set_rxmode (struct rl_softc *); static void re_reset (struct rl_softc *); @:10,32s/^/@ -641,6 +643,32 @@ } (snip) Which version/branch of FreeBSD is this for? 9.2_STABLE, 10-stable or 11-head? Does it require a specific svn revision? I just updated FreeBSD-current on new MSI motherboard (svn revision 257695). dhclient re0 still gives same error. Now I have to update FreeBSD-current amd64 on same computer. I go through this in the hope of being able to configure wifi with Hiro 50191 USB-stick-type WLAN adapter, driver rsu. So far, can't see wifi network. I see what more I need to do, or maybe no wifi signal? Tom
Thomas Mueller
2013-Nov-09 03:59 UTC
dhclient failure with Realtek 8111E Ethernet on new MSI motherboard
from Daniel Nebdal:> Ethernet without DHCP is fairly doable. > Assuming that the network is 192.168.0.x , that .100 is free, and your > router has .1 :> ifconfig re0 192.168.0.100/24 > route add default 192.168.0.1> As for DNS, I'd suggest checking on another machine what servers you get > from DHCP. For each one, add a line like > nameserver 8.8.8.8 > to /etc/resolv.conf .I think I'll try something like that: good to know how. On Slackware Linux I did, as best I remember: ifconfig eth0 192.168.1.254 netmask 255.255.255.0 route add default 192.168.1.1 dev eth0 route add default gw 192.168.1.254 dev eth0 So it looks like I only need two lines in FreeBSD or NetBSD. Subsequently, after running several live CDs and seeing how easy it was with DHCP, I switched to DHCP on one Slackware upgrade. I could copy from /etc/resolv.conf on other computer where re is good with Realtek 8111E Ethernet, or I could copy from NetBSD-current amd64 /etc/resolv.conf. If I fail with manual setup on FreeBSD, as is likely because of bug in re driver, I could try with NetBSD just to verify that my ifconfig and route commands are correct, or I could try with NetBSD first to see if I have the correct commands. When I was with BellSouth, then ATT Fastaccess DSL, DSL modem-router IP address was 192.168.1.254 . Tom