From owner-freebsd-stable@FreeBSD.ORG Wed Oct 10 03:35:06 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 99B9A16A419 for ; Wed, 10 Oct 2007 03:35:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id 5565313C447 for ; Wed, 10 Oct 2007 03:35:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so89959waf for ; Tue, 09 Oct 2007 20:35:06 -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=PJxW+X9pAuKEfznPmivvw2EdY++J/BYrh3Lk7dciFIw=; b=AkqHcFM9n2HPPBBahX55v6Hp5snJWeoOZ2HsKBkYRLanwqEN69kRmnjqPICP3hh9IKyA0M3uscUbLlBgYfHct0b3cuzvgQTuMe8rxIZ4j5bI+5O2ceiXT9cdJn+P54fhdkacutlyHnuaA8viXvyoPPi4fXzh/aG3FMzvZp/fKdc= 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=O8bREvIuuxpV6PvwOxzLSRQFd8reCvRA1ytlAFNw48XsyrLsAvPGaqUQ/FgI/8C5eXnxJW45U1AcFaIpEYHX4c8fPu8QzyV/rLhUT2qejvU+HAY0QMkmQg6nYf6jChXAE09Dn3ZxfJbAORPfsIRJ72hW1A16uDcEi1GPyOpeqUk= Received: by 10.114.146.1 with SMTP id t1mr275918wad.1191987305609; Tue, 09 Oct 2007 20:35:05 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id j6sm517833wah.2007.10.09.20.35.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2007 20:35:03 -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 l9A3VN7H055809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Oct 2007 12:31:23 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l9A3VMrK055808; Wed, 10 Oct 2007 12:31:22 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 10 Oct 2007 12:31:22 +0900 From: Pyun YongHyeon To: Abdullah Ibn Hamad Al-Marri Message-ID: <20071010033122.GB54946@cdnetworks.co.kr> References: <499c70c0710091846p3e2dd505sb54f18da30802d2d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: <499c70c0710091846p3e2dd505sb54f18da30802d2d@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: Wed, 10 Oct 2007 03:35:06 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 10, 2007 at 04:46:50AM +0300, Abdullah Ibn Hamad Al-Marri wrote: > Hello Guys, > > Maybe this is in HEAD? I'm not sure. > > intel says "Gigabit (10/100/1000 Mbits/sec) LAN subsystem using the > Realtek* RTL8111-GR Gigabit Ethernet Controller" > > Copyright (c) 1992-2007 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 6.2-STABLE #0: Sat Sep 8 03:21:29 AST 2007 > root@web:/usr/obj/usr/src/sys/WEB > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz (2666.62-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0x6fb Stepping = 11 > Features=0xbfebfbff > Features2=0xe3fd,EST,TM2,,CX16,,> > AMD Features=0x20100000 > AMD Features2=0x1 > Cores per package: 2 > real memory = 3210739712 (3062 MB) > avail memory = 3143385088 (2997 MB) > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > ioapic0 irqs 0-23 on motherboard > acpi0: on motherboard > acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 > Timecounter "HPET" frequency 14318180 Hz quality 2000 > acpi0: Power Button (fixed) > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 > cpu0: on acpi0 > cpu1: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pcib1: irq 16 at device 1.0 on pci0 > pci1: on pcib1 > pci0: at device 2.0 (no driver attached) > pcib2: irq 16 at device 28.0 on pci0 > pci2: on pcib2 > pcib3: irq 17 at device 28.1 on pci0 > pci3: on pcib3 > rl0: port > 0xc000-0xc0ff mem 0xd0020000-0xd0020fff irq 17 at device 0.0 on pci3 > rl0: [GIANT-LOCKED] > version:1.73 > rl0: Ethernet address: 00:19:d1:a7:a4:72 > rl0: Ethernet address: 00:19:d1:a7:a4:72 > pcib4: at device 30.0 on pci0 > pci4: on pcib4 > isab0: at device 31.0 on pci0 > isa0: on isab0 > atapci0: port > 0xd060-0xd067,0xd050-0xd053,0xd040-0xd047,0xd030-0xd033,0xd020-0xd02f > irq 17 at device 31.2 on pci0 > ata2: on atapci0 > ata3: on atapci0 > pci0: at device 31.3 (no driver attached) > acpi_button0: on acpi0 > acpi_button1: on acpi0 > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > atkbd0: [GIANT-LOCKED] > ata0 at port 0x1f0-0x1f7,0x3f6 irq 14 on isa0 > ata1 at port 0x170-0x177,0x376 irq 15 on isa0 > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=0x300> > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > Timecounters tick every 1.000 msec > ipfw2 initialized, divert loadable, rule-based forwarding disabled, > default to accept, logging limited to 10000 packets/entry by default > ad4: 238475MB at ata2-master SATA150 > ad6: 238475MB at ata3-master SATA150 > SMP: AP CPU #1 Launched! > Trying to mount root from ufs:/dev/ad4s1a > > rl0@pci3:0:0: class=0x020000 card=0xd6088086 chip=0x816810ec rev=0x01 hdr=0x00 > vendor = 'Realtek Semiconductor' > class = network > subclass = ethernet > > So I used Realtek driver to get it working. > > ================================================================================= > = Realtek 8139C/8139C+/8169S/8169SB/8169SC/8168B/8101E Driver for > FreeBSD v4.x/5.x/6.0 = > ================================================================================= > > shouldn't be re0 instead of rl0? > > Could someone please look into it, Pyun? Try attached patch. I've touched rl(4) too because rl(4) should not attach to unsupported hardwares. -- Regards, Pyun YongHyeon --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.patch" Index: 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 --- if_re.c 14 Aug 2007 02:00:04 -0000 1.95 +++ if_re.c 10 Oct 2007 02:54:15 -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,19 @@ */ 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: + case RL_HWREV_8168_SPIN3: 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 +1322,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: ../../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 --- ../../pci/if_rlreg.h 24 Jul 2007 01:24:03 -0000 1.67 +++ ../../pci/if_rlreg.h 10 Oct 2007 02:54:16 -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 Index: ../../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 --- ../../pci/if_rl.c 24 Jul 2007 01:24:03 -0000 1.170 +++ ../../pci/if_rl.c 10 Oct 2007 02:54:16 -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); --SkvwRMAIpAhPCcCJ--