From owner-freebsd-arm@FreeBSD.ORG Tue Jun 15 18:10:07 2010 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3B13106566C; Tue, 15 Jun 2010 18:10:07 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 597118FC0C; Tue, 15 Jun 2010 18:10:07 +0000 (UTC) Received: by pxi7 with SMTP id 7so4219195pxi.13 for ; Tue, 15 Jun 2010 11:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=+IB/TdvdbVWT61Cxw87yUS8uf5qfZRyOhvAlJWdLIss=; b=SXsFO6mnDbngYyuUSAuXM1nG/WnD9bx3VjClmQcx9Ij3RptZzdTeLiig/2BzmrUi18 xpIXEsKW1kqaqpI6fdHWnufSdaKwMfXm+urDtWAmsGErfy1r85+oIQHYXZ/5TktbWD74 rEUx8jOyF9kIip/RGf/sb+7ofhIIXztfwnuqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=dU0k+yndL9r56BmzBjY7P0Xp3U9mI69DoMRMvw4igcq/wD7d4oCSDhUx744ZZghQkK rdacNHWDU5usHQqP5uVmX1Dvx8CHiCuHjbwT3rvDzqlNsQwAEmSCRHIv9vM8amm2magC 8UdmHLJSeYyikkmwQV4re4+k1RtSlutfrl9iU= Received: by 10.141.1.1 with SMTP id d1mr6029412rvi.89.1276625406584; Tue, 15 Jun 2010 11:10:06 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id q10sm6041213rvp.20.2010.06.15.11.10.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jun 2010 11:10:05 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 15 Jun 2010 11:09:23 -0700 From: Pyun YongHyeon Date: Tue, 15 Jun 2010 11:09:23 -0700 To: Norikatsu Shigemura Message-ID: <20100615180923.GH4257@michelle.cdnetworks.com> References: <20100613233723.ed2c3a30.nork@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100613233723.ed2c3a30.nork@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: 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 Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2010 18:10:07 -0000 On Sun, Jun 13, 2010 at 11:37:23PM +0900, Norikatsu Shigemura wrote: > Hi yongari! > > I have a OpenRD Ultimate, which has two GbE ports - if_mge(4). But > I couldn't use mge1 like following. So I tried to investigate. > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > 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. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > 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. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Jun 13 15:20:01 sidearms kernel: miibus0: miibus_probe: ma.mii_id1 = 0x141, ma.mii_id2 = 0xcb3 > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > And I confirmed that MII chipset ID is same as 88E1249. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > mge0 > Marvell OBIO Memory: > 4043776000-4043784191 > Marvell OBIO IRQ: > 11 > 12 > 13 > 14 > 46 > miibus0 > e1000phy0 pnpinfo oui=0x5043 model=0xb rev=0x3 at phyno=0 > mge1 > Marvell OBIO Memory: > 4043792384-4043800575 > Marvell OBIO IRQ: > 15 > 16 > 17 > 18 > 47 > miibus1 > e1000phy1 pnpinfo oui=0x5043 model=0xb rev=0x3 at phyno=1 > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > > BTW, I knew same issue on OpenRD Client, it has a 88E1116R, maybe. > Sorry, I don't already have it. I couldn't confirm. > So accordingly my memo: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > miibus0: ma.mii_id1 = 0x141, ma.mii_id2 = 0xe40 > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > I found many initialize issues on 88E1116R by not existing on > e1000phy.c. Maybe 88E1116 = 88E1116R like following: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > switch (esc->mii_model) { > case MII_MODEL_MARVELL_E1111: > case MII_MODEL_MARVELL_E1112: > case MII_MODEL_MARVELL_E1116: > + case MII_MODEL_MARVELL_E1116R: > case MII_MODEL_MARVELL_E1118: > case MII_MODEL_MARVELL_E1149: > case MII_MODEL_MARVELL_PHYG65G: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > But there are many points, I don't know that this modify is right. > 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?