From owner-freebsd-questions@FreeBSD.ORG Thu Feb 22 21:57:50 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF0E816A400 for ; Thu, 22 Feb 2007 21:57:50 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id D3F4713C4B6 for ; Thu, 22 Feb 2007 21:57:50 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id l1MLvklB017895; Thu, 22 Feb 2007 16:57:47 -0500 (EST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-questions@freebsd.org Date: Thu, 22 Feb 2007 16:58:13 -0500 User-Agent: KMail/1.9.5 References: <45DE05EE.80804@diomedia.be> In-Reply-To: <45DE05EE.80804@diomedia.be> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702221658.13993.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: bram Subject: Re: forcing re driver to a card X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 21:57:51 -0000 On Thursday 22 February 2007 16:06, bram wrote: > Hi all, > > I've been having some trouble getting my nic's to work under freebsd 6.1. > it's a jetway mini-itx board with a daughterboard with 3 rtl8110S chips on. > two out of the three appear when doing pciconf -lv > none1@pci0:11:0: class=0x020000 card=0x10ec16f3 chip=0x816710ec > rev=0x10 hdr=0x00 > vendor = 'Realtek Semiconductor' > class = network > subclass = ethernet > none2@pci0:12:0: class=0x020000 card=0x10ec16f3 chip=0x816710ec > rev=0x10 hdr=0x00 > vendor = 'Realtek Semiconductor' > class = network > subclass = ethernet > > I think these should be supported by the re driver, so my questions are: > -Is there a way to force the re driver to recognize these cards ? > -Can the source of the re driver be changed so it recognizes the card > (if yes please some guidance, don't know C) ? The answer to your second question is probably yes; requires someone to make a patch and test with relevant hardware. Glancing at the code quickly I think you're probably right that it should be supported by re(4). The answer to your first question is: patch the source so it recognizes the card. :) The good news is that your device already seems to be listed in src/sys/pci/if_rlreg.h. If that's the case then all you need is a two-line patch to src/sys/dev/re/if_re.c. Something like this around line 185 of the file (I'm looking at revision 1.46.2.20) might do the trick: { RT_VENDORID, RT_DEVICEID_8169SC, RL_HWREV_8169_8110SB, "RealTek 8169SC/8110SC Single-chip Gigabit Ethernet" }, Drop that in the file and rebuild and reinstall your kernel and modules. If you can confirm that that works then I'd be happy to send in a PR to get it included. Solaris has an /etc/driver_aliases file that lets you do things like this without recompiling anything, but recompiling isn't really too bad once you get the hang of it. (Especially if you can get away with using modules.) JN