From owner-freebsd-arch@FreeBSD.ORG Sun Feb 12 17:52:13 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E908F1065674; Sun, 12 Feb 2012 17:52:12 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id ECE048FC0C; Sun, 12 Feb 2012 17:52:11 +0000 (UTC) Received: by eekb47 with SMTP id b47so1819081eek.13 for ; Sun, 12 Feb 2012 09:52:10 -0800 (PST) Received: by 10.14.94.200 with SMTP id n48mr4319219eef.48.1329069130786; Sun, 12 Feb 2012 09:52:10 -0800 (PST) Received: from rnote.ddteam.net (232-209-133-95.pool.ukrtel.net. [95.133.209.232]) by mx.google.com with ESMTPS id c16sm51181797eei.1.2012.02.12.09.52.08 (version=SSLv3 cipher=OTHER); Sun, 12 Feb 2012 09:52:09 -0800 (PST) Date: Sun, 12 Feb 2012 19:51:33 +0200 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20120212195133.a2864582.ray@ddteam.net> In-Reply-To: References: <95372FB3-406F-46C2-8684-4FDB672D9FCF@lassitu.de> <20120106214741.GB88161@alchemy.franken.de> <20120108130039.GG88161@alchemy.franken.de> <23477898-8D85-498C-8E30-192810BD68A8@lassitu.de> <20120111193738.GB44286@alchemy.franken.de> <66DDA0A2-F878-43FF-8824-54868F493B18@lassitu.de> <20120125221753.GA17821@alchemy.franken.de> <20120211111731.GE39861@alchemy.franken.de> <20120211144544.c91701d9.ray@ddteam.net> 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 X-Gm-Message-State: ALoCoQnDesAn4TpQcD1c09WMezfY5BKN2GIhbmZ9KkY7frLldcw8ssl/+yKHjjf9CaaJJKYk9h2p Cc: Juli Mallett , Aleksandr Rybalko , FreeBSD-arch , Stefan Bethke , Marius Strobl Subject: Re: Extending sys/dev/mii X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 17:52:13 -0000 On Sat, 11 Feb 2012 17:00:10 -0800 Adrian Chadd wrote: > Hi Ray, > > Would you please attach the latest diffs: > > * to if_arge, to make it "work"; > * to the mii API, if needed; > * anything new - ie, the switch API, switch PHYs, etc. > > I'd like to try and finally bring some sanity to the hardcoded PHY > mask handling in if_arge (and make it actually work for AR71xx and > AR724x - where AR71xx has one shared MDIO bus between both MACs, but > AR724x has two independent MDIO busses..) > > > > Adrian Hi Adrian, yes, of course, here it is: if_arge patch + white space cleanup: http://my.ddteam.net/files/2012-02-12_sys_mips_atheros.patch Switch Framework itself: http://my.ddteam.net/files/2012-02-12_switch_framework.patch sys/conf/files, as separate item, because my have a bit more difference: http://my.ddteam.net/files/2012-02-12_switch_framework_sys_conf_files.patch Just reminder, to enable it: 1. put "device switch" and driver into kernel config file, "device switch_ar8x16" for Atheros switch. 2. add hints (AR7240 for example): #------------------------------------------------ # No probe at all hint.miibus.0.phymask="0x00000000" hint.miibus.1.phymask="0x00000000" #hint.floatphy.0.at="miibus0" hint.floatphy.0.phyno=0 hint.floatphy.0.master="switch" # Find switch0 hint.floatphy.0.master_unit=0 hint.floatphy.0.master_phys=0x00000010 # Sense PHY4 hint.floatphy.0.flags=0x00000000 hint.floatphy.0.speed=100 # Switch attached to MDIO bus on arge0 hint.switch.0.at="miibus0" hint.switch.0.phyno=1 hint.ar8x16_switch.0.mii_mode=0x012603e2 hint.floatphy.1.at="miibus1" hint.floatphy.1.phyno=0 hint.floatphy.1.master="switch" # Find switch0 hint.floatphy.1.master_unit=0 hint.floatphy.1.master_phys=0x0000000f # Link Sensing PHY0-PHY3 hint.floatphy.1.flags=0x00000004 # "Link on any PHYs" | # "Static link speed" hint.floatphy.1.speed=1000 #------------------------------------------------ -- Aleksandr Rybalko