From owner-freebsd-mips@FreeBSD.ORG Wed Mar 28 20:03:09 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2BB10656B3; Wed, 28 Mar 2012 20:03:09 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 6402C8FC19; Wed, 28 Mar 2012 20:03:09 +0000 (UTC) Received: from rnote.ddteam.net (164-76-133-95.pool.ukrtel.net [95.133.76.164]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 9440FC493A; Wed, 28 Mar 2012 23:03:07 +0300 (EEST) Date: Wed, 28 Mar 2012 23:03:02 +0300 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20120328230302.d8646559.ray@dlink.ua> In-Reply-To: References: <20120328113218.e93fe3c5.ray@dlink.ua> Organization: D-Link X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: [patch] enable mdio port 1, remove phy mask hard coding X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 20:03:09 -0000 On Wed, 28 Mar 2012 11:24:35 -0700 Adrian Chadd wrote: > Hi, > > The point is that we're talking to MDIO bus 0 or 1. > > Why is that not clear? :) Because patched if_arge use it only with sc->arge_mac_unit, which is 0 for arge0, and 1 for arge1. So there is two ways: 1. Just remove unit argument. "ARGE_MII_READ(AR71XX_MAC_MII_INDICATOR)" instead of "ARGE_MII_READ(sc->arge_mac_unit,AR71XX_MAC_MII_INDICATOR)" 2. or remove it completely, since for that case ARGE_READ/ARGE_WRITE will do the same. But if you will use here another variable, (f.e. sc->arge_mdio_unit or sc->arge_mii_unit), then it would have sense. Then you will be able to set it from hints and default to sc->arge_mac_unit otherwise. > > > > Adrian -- Aleksandr Rybalko