Date: Tue, 31 Jul 2007 09:55:41 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Michael Nottebrock <lofi@freebsd.org> Cc: Laurens Timmermans <laurens@timkapel.nl>, freebsd-stable@freebsd.org Subject: Re: Various problems with re(4) on a PCIe 8168/8111B onboard NIC Message-ID: <20070731005541.GA92601@cdnetworks.co.kr> In-Reply-To: <200707310132.02537.lofi@freebsd.org> References: <200707292113.01023.lofi@freebsd.org> <46ACFD01.1030406@timkapel.nl> <20070730050354.GB88265@cdnetworks.co.kr> <200707310132.02537.lofi@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 31, 2007 at 01:31:59AM +0200, Michael Nottebrock wrote: > On Monday, 30. July 2007, Pyun YongHyeon wrote: > > > Thanks for reporting. I don't have these hardware models so I couldn't > > verify the issue. After reading the vendor's code I've made attached > > patch. I don't know whether it works or not, it's just guess work. > > Works fine here! > Since HEAD is in code freeze I guess minimal patch would be more preferable. Would you try attached patch again? -- Regards, Pyun YongHyeon --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.power.patch2" Index: if_re.c =================================================================== RCS file: /home/ncvs/src/sys/dev/re/if_re.c,v retrieving revision 1.92 diff -u -r1.92 if_re.c --- if_re.c 24 Jul 2007 01:24:02 -0000 1.92 +++ if_re.c 31 Jul 2007 00:49:34 -0000 @@ -1300,6 +1300,28 @@ goto fail; } + /* Take PHY out of power down mode. */ + if (sc->rl_type == RL_8169) { + uint32_t rev; + + rev = CSR_READ_4(sc, RL_TXCFG); + /* HWVERID 0, 1 and 2 : bit26-30, bit23 */ + rev &= 0x7c800000; + if (rev != 0) { + /* RTL8169S single chip */ + switch (rev) { + case RL_HWREV_8169_8110SB: + case RL_HWREV_8169_8110SC: + case RL_HWREV_8168_SPIN2: + re_gmii_writereg(dev, 1, 0x1f, 0); + re_gmii_writereg(dev, 1, 0x0e, 0); + break; + default: + break; + } + } + } + ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; --J2SCkAp4GZ/dPZZf--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070731005541.GA92601>