From owner-freebsd-arm@FreeBSD.ORG Mon Jun 21 13:18:35 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 0F0111065677 for ; Mon, 21 Jun 2010 13:18:35 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from georges.telenet-ops.be (georges.telenet-ops.be [195.130.137.68]) by mx1.freebsd.org (Postfix) with ESMTP id 78B3D8FC15 for ; Mon, 21 Jun 2010 13:18:34 +0000 (UTC) Received: from triton.sigsegv.be ([213.119.97.224]) by georges.telenet-ops.be with bizsmtp id YdJY1e00M4qUA0t06dJYvL; Mon, 21 Jun 2010 15:18:32 +0200 Received: from nereid (nereid.neptune.sigsegv.be [IPv6:2001:470:c8f4:0:200:ff:fe00:8]) by triton.sigsegv.be (Postfix) with SMTP id ACA6E1C127; Mon, 21 Jun 2010 15:18:31 +0200 (CEST) Received: by nereid (sSMTP sendmail emulation); Mon, 21 Jun 2010 15:18:31 +0200 Date: Mon, 21 Jun 2010 15:18:31 +0200 From: Kristof Provost To: Rafal Jaworowski Message-ID: <20100621131830.GF31846@nereid> References: <20100620220302.8eb84547.nork@FreeBSD.org> <20100621123239.GD31846@nereid> <79FA8A01-E855-405B-B967-BF2BF972DD2D@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79FA8A01-E855-405B-B967-BF2BF972DD2D@semihalf.com> X-PGP-Fingerprint: 6B6E 5EED 8ECF FAE7 1F61 7458 5046 7D0E 11B0 0EE8 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-arm@FreeBSD.org, Alexander Motin , Warner Losh , Norikatsu Shigemura Subject: Re: OpenRD-Client/Ultimate support 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: Mon, 21 Jun 2010 13:18:35 -0000 On 2010-06-21 14:46:02 (+0200), Rafal Jaworowski wrote: > > On 2010-06-21, at 14:32, Kristof Provost wrote: > > > On 2010-06-21 14:08:47 (+0200), Rafal Jaworowski wrote: > >> > >> On 2010-06-20, at 15:03, Norikatsu Shigemura wrote: > >>> 2. Change how to set PHY numbers. > >>> Suggested by: Kristof Provost > >> > >> Please elaborate on what is being fixed with PHY numbering here. > >> > > The driver simply didn't work if there were multiple ethernet ports. > > It always programmed the address of the first available PHY for both. > > I thought we tested with two ports on MV-78100, but maybe something didn't make it to the SVN tree or got mismerged. So what is the part of the patch that fixes this problem, is it this hunk? > Perhaps it did work on the MV-78100 because the bootloader initialised the MGE_REG_PHYDEV. Before r201198 the driver simply didn't set that register so the driver only worked if the bootloader did that for us. > @@ -716,8 +718,7 @@ > sc->mii = device_get_softc(sc->miibus); > > /* Tell the MAC where to find the PHY so autoneg works */ > - miisc = LIST_FIRST(&sc->mii->mii_phys); > - MGE_WRITE(sc, MGE_REG_PHYDEV, miisc->mii_phy); > + MGE_WRITE(sc, MGE_REG_PHYDEV, sc->phyaddr); > > /* Attach interrupt handlers */ > for (i = 0; i < 2; ++i) { > That's the one. Regards, Kristof