Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2013 15:36:10 +0900
From:      Yonghyeon PYUN <pyunyh@gmail.com>
To:        Thomas Mueller <mueller6724@bellsouth.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: dhclient failure with Realtek 8111E Etnernet on new MSI motherboard
Message-ID:  <20130925063610.GA1507@michelle.cdnetworks.com>
In-Reply-To: <FD.82.01446.8D25F325@cdptpa-oedge02>
References:  <FD.82.01446.8D25F325@cdptpa-oedge02>

next in thread | previous in thread | raw e-mail | index | archive | help

--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@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

It 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.1

Driver 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

--fdj2RfSjLxBAspz7
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="re.8106.diff"

Index: sys/dev/re/if_re.c
===================================================================
--- sys/dev/re/if_re.c	(revision 255757)
+++ sys/dev/re/if_re.c	(working copy)
@@ -223,6 +223,7 @@
 	{ RL_HWREV_8402, RL_8169, "8402", RL_MTU },
 	{ RL_HWREV_8105E, RL_8169, "8105E", RL_MTU },
 	{ RL_HWREV_8105E_SPIN1, RL_8169, "8105E", RL_MTU },
+	{ RL_HWREV_8106E, RL_8169, "8106E", RL_MTU },
 	{ RL_HWREV_8168B_SPIN2, RL_8169, "8168", RL_JUMBO_MTU },
 	{ RL_HWREV_8168B_SPIN3, RL_8169, "8168", RL_JUMBO_MTU },
 	{ RL_HWREV_8168C, RL_8169, "8168C/8111C", RL_JUMBO_MTU_6K },
@@ -1367,10 +1368,11 @@
 		break;
 	default:
 		device_printf(dev, "Chip rev. 0x%08x\n", hwrev & 0x7c800000);
+		sc->rl_macrev = hwrev & 0x00700000;
 		hwrev &= RL_TXCFG_HWREV;
 		break;
 	}
-	device_printf(dev, "MAC rev. 0x%08x\n", hwrev & 0x00700000);
+	device_printf(dev, "MAC rev. 0x%08x\n", sc->rl_macrev);
 	while (hw_rev->rl_desc != NULL) {
 		if (hw_rev->rl_rev == hwrev) {
 			sc->rl_type = hw_rev->rl_type;
@@ -1408,6 +1410,7 @@
 	case RL_HWREV_8401E:
 	case RL_HWREV_8105E:
 	case RL_HWREV_8105E_SPIN1:
+	case RL_HWREV_8106E:
 		sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM |
 		    RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT |
 		    RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD;
@@ -1429,7 +1432,7 @@
 		sc->rl_flags |= RL_FLAG_MACSLEEP;
 		/* FALLTHROUGH */
 	case RL_HWREV_8168C:
-		if ((hwrev & 0x00700000) == 0x00200000)
+		if (sc->rl_macrev == 0x00200000)
 			sc->rl_flags |= RL_FLAG_MACSLEEP;
 		/* FALLTHROUGH */
 	case RL_HWREV_8168CP:
Index: sys/pci/if_rlreg.h
===================================================================
--- sys/pci/if_rlreg.h	(revision 255757)
+++ sys/pci/if_rlreg.h	(working copy)
@@ -189,6 +189,7 @@
 #define	RL_HWREV_8105E		0x40800000
 #define	RL_HWREV_8105E_SPIN1	0x40C00000
 #define	RL_HWREV_8402		0x44000000
+#define	RL_HWREV_8106E		0x44800000
 #define	RL_HWREV_8168F		0x48000000
 #define	RL_HWREV_8411		0x48800000
 #define	RL_HWREV_8139		0x60000000
@@ -877,6 +878,7 @@
 	bus_dma_tag_t		rl_parent_tag;
 	uint8_t			rl_type;
 	const struct rl_hwrev	*rl_hwrev;
+	uint32_t		rl_macrev;
 	int			rl_eecmd_read;
 	int			rl_eewidth;
 	int			rl_expcap;

--fdj2RfSjLxBAspz7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130925063610.GA1507>