From owner-freebsd-stable@FreeBSD.ORG Wed Sep 25 06:36:16 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 115C7CD5 for ; Wed, 25 Sep 2013 06:36:16 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB02F2AEE for ; Wed, 25 Sep 2013 06:36:15 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id rd3so4748939pab.4 for ; Tue, 24 Sep 2013 23:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=kEsFuMYVrEA3lM0Ut9rz/arly1bO5mSJX8UscGsgToI=; b=p1w64IdD1+uH+IG4+AfNLftKuaiDTzLBDNkWKDxVeG09IQYdeuCqe1c+JkFBd+WLLQ VuxWc/f1VAYnqNcLqqFnHQRqwYEXTDW+7OTiw8T0kuBS47fUeVIETdjT0t0a+nrgd1xM FNfu8r7NEKbViJkQBspuuBfQS8mQCKI7vA7CxT1wIho7P/ARolYTHlB30fghtTNVtHOY NMZQCiV5UsAjo/wAhAjurYZNikVEQn+J115rWu75AciuS+zjKLBNUnbkVj/PsqDX17lj KayYwcqkwSog3sZ9M9pZFqKwQG1APz51SNqpA6WgD4egXJq2cJsB3kxAXkW2yOWrJido f4+w== X-Received: by 10.66.219.233 with SMTP id pr9mr32352284pac.45.1380090975557; Tue, 24 Sep 2013 23:36:15 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id yo2sm50784552pab.8.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Sep 2013 23:36:14 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 25 Sep 2013 15:36:10 +0900 From: Yonghyeon PYUN Date: Wed, 25 Sep 2013 15:36:10 +0900 To: Thomas Mueller Subject: Re: dhclient failure with Realtek 8111E Etnernet on new MSI motherboard Message-ID: <20130925063610.GA1507@michelle.cdnetworks.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 06:36:16 -0000 --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: 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: on re0 > rgephy0: 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--