From owner-freebsd-arm@FreeBSD.ORG Sun Jun 20 12:15:08 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id F124E106566B; Sun, 20 Jun 2010 12:15:06 +0000 (UTC) (envelope-from nork@FreeBSD.org) Date: Sun, 20 Jun 2010 21:15:00 +0900 From: Norikatsu Shigemura To: Pyun YongHyeon Message-Id: <20100620211500.c344b654.nork@FreeBSD.org> In-Reply-To: <20100615180923.GH4257@michelle.cdnetworks.com> References: <20100613233723.ed2c3a30.nork@FreeBSD.org> <20100615180923.GH4257@michelle.cdnetworks.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Kristof, Norikatsu Shigemura , freebsd-arm@freebsd.org, freebsd-current@freebsd.org, yongari@freebsd.org Subject: Re: [OpenRD Ultimate] e1000phy(88E1149/88E1121) has a initialize issue X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 12:15:08 -0000 Hi yongari. On Tue, 15 Jun 2010 11:09:23 -0700 Pyun YongHyeon wrote: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > Jun 13 05:02:14 sidearms kernel: mge1: watchdog timeout > > Jun 13 05:02:14 sidearms kernel: mge1: Timeout on link-up > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > This part looks like a bug in mge(4). Driver does not know how long > it would take to get a valid link. Waiting for valid link in driver > initialization does not work(e.g Starting controller without UTP > cable may always fail on mge(4)). I think mge(4) should implement > correct link state change handling. Thanks for your pointed out. I didn't notice. I'll fix this issue like following on mge_start_locked(). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) + if (IFM_SUBTYPE(sc->mii->mii_media_active) == IFM_NONE || + (ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > I found a initialize issue in e1000phy.c. > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > --- sys/dev/mii/e1000phy.c.orig 2010-05-01 10:17:15.282196000 +0900 > > +++ sys/dev/mii/e1000phy.c 2010-06-13 16:19:46.616650536 +0900 > > @@ -278,6 +278,7 @@ > > case MII_MODEL_MARVELL_E1118: > > break; > > case MII_MODEL_MARVELL_E1116: > > + case MII_MODEL_MARVELL_E1149: > > page = PHY_READ(sc, E1000_EADR); > > /* Select page 3, LED control register. */ > > PHY_WRITE(sc, E1000_EADR, 3); > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > I confirmed OK on my environment, OpenRD Ultimate has a 88E1121(I > > saw it, physically): > Once it was there but I removed it due to some other issues seen on > Yukon Ultra. That part will program LED access so I guess it > wouldn't affect normal network activity. Hum..., like following? At least, by current way, second NIC doesn't link-up if link connected. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case MII_MODEL_MARVELL_E1118: + case MII_MODEL_MARVELL_E1149: break; case MII_MODEL_MARVELL_E1116: page = PHY_READ(sc, E1000_EADR); /* Select page 3, LED control register. */ PHY_WRITE(sc, E1000_EADR, 3); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > 88E1116R might be RGMII variant of 88E1116. Because I don't have > controller that has 88E1116R I didn't treat it as 88E1116. With > that change could you use straight cable without help of MDI/MDI-X > converter? Sorry, I don't have 88E1116R machine, so I don't know.