From owner-freebsd-stable@FreeBSD.ORG Tue Mar 19 04:56:36 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A01A6742 for ; Tue, 19 Mar 2013 04:56:36 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-da0-x233.google.com (mail-da0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) by mx1.freebsd.org (Postfix) with ESMTP id 7C0C2156 for ; Tue, 19 Mar 2013 04:56:36 +0000 (UTC) Received: by mail-da0-f51.google.com with SMTP id g27so65463dan.10 for ; Mon, 18 Mar 2013 21:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:date:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=0FFKKsLAnFEk/XF8s0/MJyvX/LdiRLSGfCZKX62Zr5o=; b=xZdIPcD8pUXN4UDMk3pOozC6zwmURiGyebLO1lMCNXRYnfx2boqTpLg1DwC2DfQbsP h+nVKkz6i2CNO6W8s8LQuKdjGZH8tIFpJ66DWUEbFEtcgjNog7u2gUcJ0i1bxlRInQOi +VW9sKpuYXiHrrZ2tiET3a/q6mfVLbclkNh2YhAJHuS3kAhkpr/nkHGF3Gn2Vp+4sY5V mVNA8vTFsjvDrGf3i47JJdDJGctVHXdJIOUOXfA8psFvEa8YM2zRepaO2xUPQmLRmml0 zkSGKfLXhnKvoqOUkmSS1pgIU/ppZMSgbBnPzz96qPy3FSNOjKa2BYEPFveiQlq0i6IU 8riA== X-Received: by 10.68.222.73 with SMTP id qk9mr981216pbc.115.1363668996252; Mon, 18 Mar 2013 21:56:36 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id ip8sm22718863pbc.39.2013.03.18.21.56.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 18 Mar 2013 21:56:35 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 19 Mar 2013 13:56:29 +0900 From: YongHyeon PYUN Date: Tue, 19 Mar 2013 13:56:29 +0900 To: Michael BlackHeart Subject: Re: A few problems Message-ID: <20130319045629.GA1437@michelle.cdnetworks.com> References: <20130318065938.GB1459@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 19 Mar 2013 04:56:36 -0000 On Mon, Mar 18, 2013 at 05:19:11PM +0400, Michael BlackHeart wrote: > 2013/3/18 YongHyeon PYUN : > > On Sat, Mar 16, 2013 at 01:08:06PM +0400, Michael BlackHeart wrote: > >> Hello there. I've got a couple of things I don't get or can't handle. > >> > > > > [...] > > > >> re0@pci0:4:0:0: class=0x020000 card=0x512c1462 chip=0x816810ec rev=0x02 hdr=0x00 > >> vendor = 'Realtek Semiconductor Co., Ltd.' > >> device = 'RTL8111/8168B PCI Express Gigabit Ethernet controller' > >> class = network > >> subclass = ethernet > >> bar [10] = type I/O Port, range 32, base 0xd800, size 256, enabled > >> bar [18] = type Memory, range 64, base 0xfeaff000, size 4096, enabled > >> bar [20] = type Prefetchable Memory, range 64, base 0xf8ff0000, > >> size 65536, enabled > >> cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0 > >> cap 05[50] = MSI supports 1 message, 64 bit > >> cap 10[70] = PCI-Express 1 endpoint IRQ 1 max data 128(256) link x1(x1) > >> speed 2.5(2.5) > >> cap 11[b0] = MSI-X supports 2 messages in map 0x20 enabled > >> cap 03[d0] = VPD > >> ecap 0001[100] = AER 1 0 fatal 0 non-fatal 2 corrected > >> ecap 0002[140] = VC 1 max VC0 > >> ecap 0003[160] = Serial 1 01000000684ce000 > >> > >> re0: flags=8843 metric 0 mtu 1500 > >> description: ToISP > >> options=8218b > >> ether 00:21:85:1c:24:fa > >> media: Ethernet autoselect (100baseTX ) > >> status: active > > > > [...] > > > >> One is that re0 doesn't neogatiate direct link with a connected PC > >> (using non-crossover UTP), but sk0 does that easy. It seems to me that > >> according to RTL8111 chip specification there shouldn't be any > >> problem, probably it's a driver problem? > >> > > > > What is your link parter for re0? I don't remember whether the PHY > > hardware really supports automatic MDI crossover detection. Even if > > the PHY hardware does not support it, the link partner would be > > able to do that. > > > > And could you show me the output of dmesg(re(4) and rgephy(4) only) > > and "devinfo -rv | grep rgephy"? > > Here's info: > > re0: port > 0xd800-0xd8ff mem 0xfeaff000-0xfeafffff,0xf8ff0000-0xf8ffffff irq 17 > at device 0.0 on pci4 > re0: Using 1 MSI-X message > re0: Chip rev. 0x3c000000 > re0: MAC rev. 0x00400000 > miibus0: on re0 > rgephy0: PHY 1 on miibus0 > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, > 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, > 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, > 1000baseT-FDX-flow-master, auto, auto-flow > re0: Ethernet address: 00:21:85:1c:24:fa > > devinfo -rv | grep rgephy > rgephy0 pnpinfo oui=0xe04c model=0x11 rev=0x2 at phyno=1 > > This link connected to Realtek 8111E under Win7. > I'll repeat that when it's connected to sk0, everything works. Of e1000phy(4) supports automatic crossover detection/correction. I thought newer RealTek 8211 PHYs also support the feature but it seems it's not enabled by default. Could you try attached patch and let me know how it goes? > course when I'm switching links, I change IPs and other configuration > in rc.conf and reboots system. > > For example I'll provide info for sk0 (Dlink DGE-530T): > > skc0: port 0xe800-0xe8ff mem > 0xfebec000-0xfebeffff irq 17 at device 1.0 on pci5 > skc0: DGE-530T Gigabit Ethernet Adapter rev. (0x9) > sk0: on skc0 > sk0: Ethernet address: 00:19:5b:86:3b:53 > miibus1: on sk0 > e1000phy0: PHY 0 on miibus1 > e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto > > e1000phy0 pnpinfo oui=0xac2 model=0x2 rev=0x5 at phyno=0