Date: Fri, 19 Dec 2008 09:47:37 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Bruce Cran <bruce@cran.org.uk> Cc: current@freebsd.org Subject: Re: RTL8102E (if_re) doesn't work with -current Message-ID: <20081219004737.GA75314@cdnetworks.co.kr> In-Reply-To: <20081218043234.GA26186@muon.cran.org.uk> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081219004737.GA75314>
