Date: Thu, 17 Aug 2006 11:28:15 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Dinesh Nair <dinesh@alphaque.com> Cc: freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: Unable to get RealTek 8139C+ to work with re(4) under FreeBSD 6.1 Message-ID: <20060817022815.GD49739@cdnetworks.co.kr> In-Reply-To: <44E06697.4090507@alphaque.com> References: <44E040CF.9080205@alphaque.com> <20060814103946.GC36904@cdnetworks.co.kr> <44E056BE.4080104@alphaque.com> <20060814110959.GD36904@cdnetworks.co.kr> <44E06697.4090507@alphaque.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--9Ek0hoCL9XbhcSqy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Aug 14, 2006 at 08:03:35PM +0800, Dinesh Nair wrote: > > > On 08/14/06 19:09 Pyun YongHyeon said the following: > >really sucks and need much more CPU power to saturate the link. > >So I don't think it's good idea to make rl(4) serve 8139C+. > > perhaps, but re(4) doesn't work at the moment on this chipset, and i'd > rather have something which works, albeit a little poorly, than something > which doesn't. > > >Yes. What `ident /boot/kernel/if_re.ko` shows? > > $FreeBSD: src/sys/dev/re/if_re.c,v 1.46.2.19 2006/08/07 02:38:07 yongari > Exp $ > > and the latest if_rlreg.c which i pulled down shows, > > $FreeBSD: src/sys/pci/if_rlreg.h,v 1.51.2.7 2006/08/01 17:36:50 wpaul Exp $ > > i'm not using the loadable modules though, and am building the re(4) device > into the kernel directly. > > the symptoms remain the same, i.e. IP traffic doesn't flow at all, though > 'arp -an' does show the ethernet address of the other box attempting to > ping this. > > the OP at > http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027356.html > mentioned that it was working fine before breakage was introduced > relatively recently (~ 2 weeks ago), and thus something's changed in the > interim which is causing this to happen. > Here is guess work(I don't have 8139C+ based NICs). Would you give it a try? -- Regards, Pyun YongHyeon --9Ek0hoCL9XbhcSqy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.patch" --- if_re.c.orig Thu Aug 3 09:15:19 2006 +++ if_re.c Thu Aug 17 11:25:31 2006 @@ -541,6 +541,10 @@ return (0); } rval = CSR_READ_2(sc, re8139_reg); + if (sc->rl_type == RL_8139CPLUS && re8139_reg == RL_BMCR) { + /* 8139C+ uses different bit layout */ + rval &= ~(BMCR_LOOP | BMCR_ISO); + } return (rval); } @@ -567,6 +571,10 @@ switch (reg) { case MII_BMCR: re8139_reg = RL_BMCR; + if (sc->rl_type == RL_8139CPLUS) { + /* 8139C+ uses different bit layout */ + data &= ~(BMCR_LOOP | BMCR_ISO); + } break; case MII_BMSR: re8139_reg = RL_BMSR; --9Ek0hoCL9XbhcSqy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060817022815.GD49739>