From owner-freebsd-current@FreeBSD.ORG Wed Dec 17 09:19:44 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BD43106564A for ; Wed, 17 Dec 2008 09:19:44 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2F90F8FC1D for ; Wed, 17 Dec 2008 09:19:44 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id f9so1501382rvb.7 for ; Wed, 17 Dec 2008 01:19:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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=PHiM4fEXNzsUmXo4MKhv0lgnAkFtcAa7SXE5HsUJKW8=; b=fRH+cTvEkg4tkyO5+tvdtUbmo4QcP473KsBpI+Z+34vNyKvnk6utJ64zhDtYGt++v2 w0s0p25kmaIqaEtIGoIPprlwfO43Eb0PmXUkQjzuZ1YBuCgGSrTUrdbmVDlBGPLLrdcw PnLHvpoCHGFD0/sap80BE+7OHpz/Nf8x4vUgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=SmIcjWWKa/Rw4ebIv2Jjq2/3fQFckva3/jexxQinWwP9+KIgefWxtEDH6Q29gnDvGz eJ2TQZ5CFJD2hPto6MkprR7vy6H+cKwxIDysjD6Q6kBuzE+HT3wRK0QfJok713AQ8dlU UWw2khdx914dZ4qFpgnRTPWvDH0o0Vlq68RKs= Received: by 10.141.40.7 with SMTP id s7mr272485rvj.268.1229505583850; Wed, 17 Dec 2008 01:19:43 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([211.53.35.84]) by mx.google.com with ESMTPS id f21sm2387008rvb.7.2008.12.17.01.19.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Dec 2008 01:19:42 -0800 (PST) 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 mBH9JYWL068725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Dec 2008 18:19:34 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id mBH9JYgw068724; Wed, 17 Dec 2008 18:19:34 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 17 Dec 2008 18:19:34 +0900 From: Pyun YongHyeon To: Bruce Cran Message-ID: <20081217091934.GH66999@cdnetworks.co.kr> References: <4947E59A.8000408@cran.org.uk> <20081217005106.GA66999@cdnetworks.co.kr> <49486EDD.6060607@cran.org.uk> <20081217034155.GB66999@cdnetworks.co.kr> <494897CB.7000507@cran.org.uk> <20081217084633.GG66999@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gE7i1rD7pdK0Ng3j" Content-Disposition: inline In-Reply-To: <20081217084633.GG66999@cdnetworks.co.kr> User-Agent: Mutt/1.4.2.1i Cc: current@freebsd.org Subject: Re: RTL8102E (if_re) doesn't work with -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 17 Dec 2008 09:19:44 -0000 --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 17, 2008 at 05:46:33PM +0900, To Bruce Cran wrote: > On Tue, Dec 16, 2008 at 10:10:19PM -0800, Bruce Cran wrote: > > Pyun YongHyeon wrote: > > >On Tue, Dec 16, 2008 at 07:15:41PM -0800, Bruce Cran wrote: > > > > Pyun YongHyeon wrote: > > > > >On Tue, Dec 16, 2008 at 09:30:02AM -0800, Bruce Cran wrote: > > > > > > I just upgraded an HP Pavillion laptop from 7.1-RC1 to 8-CURRENT > > > last > > > night and now the network doesn't work. This laptop has a > > > RTL8102E > > > chip, and no errors appear in the logs - it attaches and > > > doesn't claim > > > to have any TX/RX errors, but it just doesn't do > > > anything. I've > > > attached the dmesg from a verbose boot. I've seen > > > messages saying > > > there might be issues with MSI interrupts - is that > > > possibly an issue > > here? > > > > > > > > > > > > > > > >No, it is in disabled state by default. > > > > >The issue could be related with link state tracking code in re(4). > > > > >Would you show me the output of "devinfo -rv | grep rlphy"? > > > > >How about unplugging/replugging UTP cable? > > > > >Does it make any difference? > > > > > > > > > > > > > devinfo provides the output: > > > > rlphy0 pnpinfo oui=0x20 model=0x20 rev=0x1 at phyno=1 > > > > > > > > I let the startup continue so that dhclient was still running in the > > > > background, and I started getting lots of messages: > > > > > > > > arp: 00:1e:ec:72:2b:8e attempts to modify permanent entry for 0.0.0.0 > > > on re0 > > > > > > > > After unplugging the replugging the UTP cable the messages > > > > > > > > re0: link state changed to DOWN > > > > re0: link state changed to UP > > > > > > > > apppeared in the logs but dhclient still didn't get any replies, and > > > the > arp messages started again. > > > > > > > > > >Hmm, this seem to happen when link partner doesn't support NWAY > > >autonegotiation. Can you confirm that? > > >And would you try attached patch? Also show me the outout of > > >"ifconfig re0" before/after applying attached patch. > > > > > The laptop is connected straight into the apartment internet system, so > > I don't know what sort of switch it is. However I applied your 2nd > > patch but nothing changed; the ifconfig output is still > > > > re0: flags=8843 metric 0 mtu 1500 > > > > options=389b > > ether 00:1e:ec:f5:fd:4f > > inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 > > media: Ethernet autoselect (100baseTX ) > > status: active > > > > I did notice that if I unplug and replug the UTP cable while dhclient is > > trying to find a lease during startup then as soon as I plug it in again > > it claims to find a lease and configures the IP address, routes etc. > > However trying to ping anything once the system has started results in > > the message "No buffer space available" so the network isn't really working. > > > > Would you try attached patch again?(Don't backout rlphy.patch2). Oops, please forget previous patch and use attached patch instead. -- Regards, Pyun YongHyeon --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.link.patch2" Index: if_re.c =================================================================== --- if_re.c (revision 186214) +++ if_re.c (working copy) @@ -2681,7 +2681,14 @@ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->rl_flags &= ~RL_FLAG_LINK; + /* + * XXX + * Since we don't request reset for rlphy(4), it's necessary + * to set initial (fake) link state. Otherwise re(4) wouldn't + * work as link state 'UP' event from mii(4) may not be + * delivered if the valid link was already established. + */ + sc->rl_flags |= RL_FLAG_LINK; sc->rl_watchdog_timer = 0; callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } --gE7i1rD7pdK0Ng3j--