From owner-freebsd-current@FreeBSD.ORG Tue Oct 29 06:14:24 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7F24F3A7 for ; Tue, 29 Oct 2013 06:14:24 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42FF12C22 for ; Tue, 29 Oct 2013 06:14:24 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id wp4so4799865obc.12 for ; Mon, 28 Oct 2013 23:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/sq/9t9jga5FvakxMzIyMlRFdFP/HrrS7AGXH5PGH8c=; b=Vi738wQIix9f0N14Psw7sNg6xvyishVhqusEArevcsae7uxxd+M/nOlHh/5I8zbLrr +LripGto+9Z3CEHzVNHAaqAh2nVNp2TB6Zv8xfO2ylnVGwH0TgfsCTg0TAAwVKt6oQND I8RGDJP4Gz6KlQp3dPRcb4UX7awxWys85XgLjRsf8IVfMPDxbNYbFM+w5nWp8ixdBN5A seSdPm/eOroZTGqNYA3HqhbVPQwnvSez+akMSoEetgYHxRq7njMpUE0ECuclxy8/lpWr cMIgTWk96r718/fPXJT8zpNp1iBT2TR8Nf8hTqltgxsxICGc1aiDBlQTZDxkESs0dUCd j1AA== X-Received: by 10.60.134.14 with SMTP id pg14mr921802oeb.66.1383027263189; Mon, 28 Oct 2013 23:14:23 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id r3sm40765010oep.2.2013.10.28.23.14.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Oct 2013 23:14:22 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 29 Oct 2013 15:14:17 +0900 From: Yonghyeon PYUN Date: Tue, 29 Oct 2013 15:14:17 +0900 To: Scott Long Subject: Re: Shuttle DS47 - Realtek RT 8111G Message-ID: <20131029061417.GB1390@michelle.cdnetworks.com> References: <2F1C253C-BA52-4B5F-8DA9-0C15D46054A4@bluewin.ch> <206B1EDA-567F-4E58-AB71-AB91C4B8484B@samsco.org> <20130916021738.GA3619@michelle.cdnetworks.com> <4EA55409-2597-4931-B6B3-BF9DD11CD2EF@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EA55409-2597-4931-B6B3-BF9DD11CD2EF@samsco.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org, Thomas Guldener X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 06:14:24 -0000 On Sun, Sep 15, 2013 at 09:04:28PM -0600, Scott Long wrote: > > On Sep 15, 2013, at 8:17 PM, Yonghyeon PYUN wrote: > > > On Sat, Sep 14, 2013 at 08:47:06PM -0600, Scott Long wrote: > >> Index: sys/dev/re/if_re.c > >> =================================================================== > >> --- sys/dev/re/if_re.c (revision 255582) > >> +++ sys/dev/re/if_re.c (working copy) > >> @@ -234,6 +234,10 @@ > >> { RL_HWREV_8168E_VL, RL_8169, "8168E/8111E-VL", RL_JUMBO_MTU_6K}, > >> { RL_HWREV_8168F, RL_8169, "8168F/8111F", RL_JUMBO_MTU_9K}, > >> { RL_HWREV_8411, RL_8169, "8411", RL_JUMBO_MTU_9K}, > >> + { RL_HWREV_8168_0, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K}, > >> + { RL_HWREV_8168_1, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K}, > >> + { RL_HWREV_8168_2, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K}, > >> + { RL_HWREV_8168_4, RL_8169, "8411", RL_JUMBO_MTU_9K}, > >> { 0, 0, NULL, 0 } > >> }; > >> > >> @@ -1457,6 +1461,10 @@ > >> case RL_HWREV_8168E_VL: > >> case RL_HWREV_8168F: > >> case RL_HWREV_8411: > >> + case RL_HWREV_8168G_0: > >> + case RL_HWREV_8168G_1: > >> + case RL_HWREV_8168G_2: > >> + case RL_HWREV_8168G_4: > >> sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | > >> RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | > >> RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | > >> Index: sys/pci/if_rlreg.h > >> =================================================================== > >> --- sys/pci/if_rlreg.h (revision 255582) > >> +++ sys/pci/if_rlreg.h (working copy) > >> @@ -191,6 +191,10 @@ > >> #define RL_HWREV_8402 0x44000000 > >> #define RL_HWREV_8168F 0x48000000 > >> #define RL_HWREV_8411 0x48800000 > >> +#define RL_HWREV_8168G_0 0x4c000000 > >> +#define RL_HWREV_8168G_1 0x4c100000 > > > > I don't know exact model number for these MACs but it may be 8168G. > > > >> +#define RL_HWREV_8168G_2 0x50900000 > > > > This looks like 8168GU. > > > >> +#define RL_HWREV_8168G_4 0x5c800000 > > > > This looks like 8411B. > > > > RL_TXCFG_HWREV is 0x7CC00000 so driver will not see > > RL_HWREV_8168G_1(0x4c100000) and RL_HWREV_8168G_2(0x50900000). > > > > It seems newer RealTek controllers seem to use ODP to access PHY. > > In addition, these controllers may need to set RX DMA parameter > > (bit 11 of RL_RXCFG). I'm not sure what this bit does though. > > > > Scott, did you test your patch on real H/W? If it works I'm fine > > with your patch. Just remove RL_HWREV_8168G_1 and RL_HWREV_8168G_2 > > as current driver has no way to get these revisions. > > I tested the 0x4c00000 on real hardware. an MSI Z87I motherboard. The rest came from looking at the linux driver. That driver is structured very differently (and better, IMHO) than the FreeBSD one, so there's a lot that wasn't obvious to me. I'd be very happy to work more on this with your guidance. > FYI: Fixed in r257304-257306.