From owner-freebsd-hardware@FreeBSD.ORG Thu Aug 17 02:26:24 2006 Return-Path: X-Original-To: freebsd-hardware@freebsd.org Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6E9A16A4E5 for ; Thu, 17 Aug 2006 02:26:24 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BD1543D55 for ; Thu, 17 Aug 2006 02:26:23 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id c59so565192pyc for ; Wed, 16 Aug 2006 19:26:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=KViYQAkddzWhPYgE9wP0i0UdGfk8Ew06LvLUoXOaiQeOPsEOYoOifkOpf76y9EbEHUcOziLRvmn3ciXYz/y3eQhway0DT+mqwc1OvIwjLtwJMff7ofVp3Ow7zccz18R0AZlXvsZtkVRG/lUY1X6nUQD3OYpWNH9W9uhOn/UOmAc= Received: by 10.35.91.10 with SMTP id t10mr2593240pyl; Wed, 16 Aug 2006 19:26:22 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id 15sm3656185nzp.2006.08.16.19.26.20; Wed, 16 Aug 2006 19:26:22 -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 k7H2SGS3051253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Aug 2006 11:28:16 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7H2SFNj051252; Thu, 17 Aug 2006 11:28:15 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Thu, 17 Aug 2006 11:28:15 +0900 From: Pyun YongHyeon To: Dinesh Nair Message-ID: <20060817022815.GD49739@cdnetworks.co.kr> References: <44E040CF.9080205@alphaque.com> <20060814103946.GC36904@cdnetworks.co.kr> <44E056BE.4080104@alphaque.com> <20060814110959.GD36904@cdnetworks.co.kr> <44E06697.4090507@alphaque.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9Ek0hoCL9XbhcSqy" Content-Disposition: inline In-Reply-To: <44E06697.4090507@alphaque.com> User-Agent: Mutt/1.4.2.1i 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 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 02:26:25 -0000 --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--