From owner-svn-src-all@FreeBSD.ORG Wed Mar 4 03:48:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 814829DC; Wed, 4 Mar 2015 03:48:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5297FB64; Wed, 4 Mar 2015 03:48:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t243mCdm088105; Wed, 4 Mar 2015 03:48:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t243mCHA088103; Wed, 4 Mar 2015 03:48:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503040348.t243mCHA088103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 4 Mar 2015 03:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279577 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 03:48:12 -0000 Author: adrian Date: Wed Mar 4 03:48:11 2015 New Revision: 279577 URL: https://svnweb.freebsd.org/changeset/base/279577 Log: Fix both arge0 and arge1 to work correctly on the AP135. * Force the arge0 interface to not use a PHY for speed negotiation for now. It'd be nice to do it, but right now the RGMII interface to the switch needs to stay at 1000/full in order to match what the switch side of the port is programmed as. So until that's all sorted out, disconnect arge0 from the PHY and leave it at fixed at 1000/full. I noticed this when I tried using a busted ethernet cable that forced the PHY to negotiate 100/full. The switch was fine and it negotiated to 100/full, but then arge0 saw the link update and set the speed to 100/full when the switch side of that hook up was set to 1000/full. Tsk. * When using argemdio, the mdio device resets and initialises the MAC, /not/ the arge_attach (or, as I discovered, arge_init.) So arge1 wasn't being fully initialised and thus no traffic would ever flow. So until I tidy up that mess, just create an argemdio bus for arge1. It's totally fine; it won't do anything or find anything attached to it. Tested: * AP135 reference board - both arge0 and arge1 now work. Modified: head/sys/mips/conf/AP135.hints Modified: head/sys/mips/conf/AP135.hints ============================================================================== --- head/sys/mips/conf/AP135.hints Wed Mar 4 02:56:32 2015 (r279576) +++ head/sys/mips/conf/AP135.hints Wed Mar 4 03:48:11 2015 (r279577) @@ -14,6 +14,12 @@ hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 +# mdiobus1 on arge1 - required to bring up arge1? +hint.argemdio.1.at="nexus0" +hint.argemdio.1.maddr=0x1a000000 +hint.argemdio.1.msize=0x1000 +hint.argemdio.1.order=0 + # AR8327 - connected via mdiobus0 on arge0 hint.arswitch.0.at="mdio0" hint.arswitch.0.is_7240=0 # definitely not the internal switch! @@ -77,8 +83,10 @@ hint.arswitch.0.port.6.txpause=1 hint.arswitch.0.port.6.rxpause=1 # arge0 - hooked up to AR8327 GMAC6, RGMII -hint.arge.0.phymask=0x10 +hint.arge.0.phymask=0x0 hint.arge.0.miimode=3 # RGMII +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 hint.arge.0.pll_1000=0x56000000 # MAC for arge0 is the first 6 bytes of the ART