From owner-freebsd-current@FreeBSD.ORG Fri Dec 19 00:47:45 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 CD8D11065674 for ; Fri, 19 Dec 2008 00:47:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 943668FC18 for ; Fri, 19 Dec 2008 00:47:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2009617rvf.43 for ; Thu, 18 Dec 2008 16:47:45 -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=GjQntpznUyRX4p2TRRUkMY1DfyNK1sKzSG4Y41K4d1U=; b=EKDlL6xdligbakTbS5Yac2W/kkevwYsfIw2bfIPkrhyzojLMTUh48vAIt2ATwhVTqq BqLl7CslqsXuZJvoh3NjhuiNoKi1XSbc7ET+O5lyIP2AK9fJVjXgl5Lqtr7DszpDdPGy apzkRhcIbnXhR3zrM+2UKgw5xPADqNUmsg4Cg= 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=PgK6bb8J0ucysG+DLkNKVsfqQjDRpFCnJgncdRjF3iNPC+JSkRo7JqlGbakn5DVP7L O3WeOcFVVesqH5x9rb1e655AGPJ6eWekNZv3IDuwZ7fs+KYFOVBOXmvoPFvFa0/uUTon qo+XjpoqAOti//4+y4Lw/AKeQtyd29MGfMVZI= Received: by 10.140.133.10 with SMTP id g10mr1253019rvd.214.1229647664802; Thu, 18 Dec 2008 16:47:44 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([211.53.35.84]) by mx.google.com with ESMTPS id b8sm13973544rvf.3.2008.12.18.16.47.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Dec 2008 16:47:43 -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 mBJ0lcs3075536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Dec 2008 09:47:38 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id mBJ0lbxM075535; Fri, 19 Dec 2008 09:47:37 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 19 Dec 2008 09:47:37 +0900 From: Pyun YongHyeon To: Bruce Cran Message-ID: <20081219004737.GA75314@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> <20081217091934.GH66999@cdnetworks.co.kr> <20081218043234.GA26186@muon.cran.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <20081218043234.GA26186@muon.cran.org.uk> 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: Fri, 19 Dec 2008 00:47:45 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 17, 2008 at 11:32:34PM -0500, Bruce Cran wrote: > On Wed, Dec 17, 2008 at 06:19:34PM +0900, Pyun YongHyeon wrote: > > > > Oops, please forget previous patch and use attached patch instead. > > > > 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); > > } > > With that patch applied (I kept the changes to rlphy.c too) the network is > now working again. Thanks! > Thanks for testing! Becasue there is possibility of watchdog timeouts would you please try attached patch again? (Make sure to backout all the applied patches before testing new patch.) -- Regards, Pyun YongHyeon --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="re.link.patch3" Index: sys/dev/re/if_re.c =================================================================== --- sys/dev/re/if_re.c (revision 186214) +++ sys/dev/re/if_re.c (working copy) @@ -2693,12 +2693,17 @@ re_ifmedia_upd(struct ifnet *ifp) { struct rl_softc *sc; + struct mii_softc *miisc; struct mii_data *mii; int error; sc = ifp->if_softc; mii = device_get_softc(sc->rl_miibus); RL_LOCK(sc); + if (mii->mii_instance) { + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + mii_phy_reset(miisc); + } error = mii_mediachg(mii); RL_UNLOCK(sc); --0F1p//8PRICkK4MW--