From owner-freebsd-stable@FreeBSD.ORG Mon Oct 15 01:46:16 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A169C16A46E for ; Mon, 15 Oct 2007 01:46:16 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id 535DC13C4BA for ; Mon, 15 Oct 2007 01:46:15 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1166970rvb for ; Sun, 14 Oct 2007 18:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=La5+HsaOhzHftz1+ln5vjdzVfNH3j7+ZCsD/Yp9yx84=; b=fbSSgCUGLoz6Gvw7QiZslBud0tawJJ8CHCZDzAZHtssdiXQ/S68yFy36JM+xQGx9xwTcfYMVZVPQaidqiQS7iENFU8QY1V7DqVZ81BXbhGfAoRhP7ZjZCe0par7SUAP8eg+hAjKblrO4mWH1tSBuvJ5ymt04mW0ZdAbGmxhNol4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=i7E/vgRQmVd/bKXqNR3o8NqbIdk/AwepLw/VpLimtoC+S9BTdcZLsgk0OnU9Pn9X9D9atTrgRno1VDiWrGrgoShACmCfhDo25KtKm8gjsenCTx37pxMuDZ6+PzgfcdZFCurFa52iA3Zo+VZ/cdan4jZx5ITuYNm5c7JJtS638y8= Received: by 10.114.149.2 with SMTP id w2mr6390395wad.1192412770849; Sun, 14 Oct 2007 18:46:10 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id l36sm6965859waf.2007.10.14.18.46.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Oct 2007 18:46:09 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l9F1gRU5075775 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Oct 2007 10:42:27 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l9F1gRpV075774; Mon, 15 Oct 2007 10:42:27 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 15 Oct 2007 10:42:27 +0900 From: Pyun YongHyeon To: Abdullah Ibn Hamad Al-Marri Message-ID: <20071015014227.GC75267@cdnetworks.co.kr> References: <499c70c0710091846p3e2dd505sb54f18da30802d2d@mail.gmail.com> <20071010033122.GB54946@cdnetworks.co.kr> <499c70c0710100708g30a2912n1d1e72703d099dd0@mail.gmail.com> <20071011004814.GB58828@cdnetworks.co.kr> <499c70c0710140524n5ade2c39r4ff61dfa5ce9a47@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <499c70c0710140524n5ade2c39r4ff61dfa5ce9a47@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Stable List , Pyun YongHyeon Subject: Re: Realtek eth isn't detected in Intel DG31PR mobo X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 15 Oct 2007 01:46:16 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 14, 2007 at 03:24:33PM +0300, Abdullah Ibn Hamad Al-Marri wrote: [...] > Pyrun, > > I hope you are doing well. > > Thank you for the patch, and your good attempt to help with this issue. > > I spent 2 hours with the patch it did detect the Ethernet as re0 but the > network did not work at all even though it said connected at auto 100 mbps > full duplex. The server sent out a packet storm of arp traffic or some kind > of traffic which caused a lot of problems in my overall network. I'm not > exactly sure what happened but maybe you know about it. So I removed the > patch and used the rl0 driver from Realtek again. > > It's very strange I didn't see anything like it before. > Sorry, please try again with attached patch. I guess I've misprogrammed Rx filter. -- Regards, Pyun YongHyeon --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.patch2" Index: sys/dev/re/if_re.c =================================================================== RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v retrieving revision 1.95 diff -u -r1.95 if_re.c --- sys/dev/re/if_re.c 14 Aug 2007 02:00:04 -0000 1.95 +++ sys/dev/re/if_re.c 15 Oct 2007 01:43:20 -0000 @@ -180,6 +180,8 @@ "RealTek 8168/8111B PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8168, RL_HWREV_8168_SPIN2, "RealTek 8168/8111B PCIe Gigabit Ethernet" }, + { RT_VENDORID, RT_DEVICEID_8168, RL_HWREV_8168_SPIN3, + "RealTek 8168/8111B PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169, "RealTek 8169 Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, RL_HWREV_8169S, @@ -221,6 +223,7 @@ { RL_HWREV_8100E, RL_8169, "8100E"}, { RL_HWREV_8101E, RL_8169, "8101E"}, { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, + { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, { 0, 0, NULL } }; @@ -676,14 +679,18 @@ */ hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; - - if (hwrev == RL_HWREV_8100E || hwrev == RL_HWREV_8101E || - hwrev == RL_HWREV_8168_SPIN1 || hwrev == RL_HWREV_8168_SPIN2) { + switch (hwrev) { + case RL_HWREV_8100E: + case RL_HWREV_8101E: + case RL_HWREV_8168_SPIN1: + case RL_HWREV_8168_SPIN2: CSR_WRITE_4(sc, RL_MAR0, bswap32(hashes[1])); CSR_WRITE_4(sc, RL_MAR4, bswap32(hashes[0])); - } else { + break; + default: CSR_WRITE_4(sc, RL_MAR0, hashes[0]); CSR_WRITE_4(sc, RL_MAR4, hashes[1]); + break; } } @@ -1314,6 +1321,7 @@ case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SC: case RL_HWREV_8168_SPIN2: + case RL_HWREV_8168_SPIN3: re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); break; Index: sys/pci/if_rl.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_rl.c,v retrieving revision 1.170 diff -u -r1.170 if_rl.c --- sys/pci/if_rl.c 24 Jul 2007 01:24:03 -0000 1.170 +++ sys/pci/if_rl.c 15 Oct 2007 01:43:20 -0000 @@ -756,14 +756,31 @@ hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); - /* Don't attach to 8139C+ or 8169/8110 chips. */ - if (hwrev == RL_HWREV_8139CPLUS || - (hwrev == RL_HWREV_8169 && - t->rl_did == RT_DEVICEID_8169) || - hwrev == RL_HWREV_8169S || - hwrev == RL_HWREV_8110S) { + /* + * Don't attach to 8139C+/8169/8169S/8110S/8168 + * 8111/8101E chips. + */ + switch (hwrev) { + case RL_HWREV_8139CPLUS: + case RL_HWREV_8110S: + case RL_HWREV_8169S: + case RL_HWREV_8101: + case RL_HWREV_8100: + case RL_HWREV_8169_8110SB: + case RL_HWREV_8169_8110SC: + case RL_HWREV_8168_SPIN1: + case RL_HWREV_8100E: + case RL_HWREV_8101E: + case RL_HWREV_8168_SPIN2: + case RL_HWREV_8168_SPIN3: t++; continue; + case RL_HWREV_8169: + if (t->rl_did == RT_DEVICEID_8169) { + t++; + continue; + } + break; } device_set_desc(dev, t->rl_name); Index: sys/pci/if_rlreg.h =================================================================== RCS file: /home/ncvs/src/sys/pci/if_rlreg.h,v retrieving revision 1.67 diff -u -r1.67 if_rlreg.h --- sys/pci/if_rlreg.h 24 Jul 2007 01:24:03 -0000 1.67 +++ sys/pci/if_rlreg.h 15 Oct 2007 01:43:20 -0000 @@ -156,6 +156,7 @@ #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 #define RL_HWREV_8168_SPIN2 0x38000000 +#define RL_HWREV_8168_SPIN3 0x38400000 #define RL_HWREV_8139 0x60000000 #define RL_HWREV_8139A 0x70000000 #define RL_HWREV_8139AG 0x70800000 --qDbXVdCdHGoSgWSk--