From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 08:03:16 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51E2B106566C; Fri, 16 Dec 2011 08:03:16 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 13EC98FC13; Fri, 16 Dec 2011 08:03:16 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 64C2A906E3; Fri, 16 Dec 2011 09:03:15 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Stefan Bethke In-Reply-To: Date: Fri, 16 Dec 2011 09:03:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: "freebsd-embedded@freebsd.org" Subject: Re: Updated switch/glue patch? X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 08:03:16 -0000 Am 16.12.2011 um 01:54 schrieb Adrian Chadd: > I have it compiling and working in the kernel. I haven't tested it as = a module. >=20 > The LAN ports are VLAN 1 (untagged) and I haven't tested those; the > WAN port is VLAN 2 (tagged) and I've verified this works. > Woot. :) >=20 > Now, LORs. I haven't looked at looking at all so far. There is one more problem which is not immediately apparent: the = register access is slooooow. The rtl_tick callback that runs once a = second needs .8 seconds to complete, see sysctl debug.rtl8366rb. Most = of this time is spent in DELAY() in iicbb.c, making the system rather = unresponsive. rtl_tick() runs mii_tick() and mii_pollstat() for all five PHYs. We can = likely leave out mii_tick() since the built-in PHYs don't need ticks for = autonegotiation to work correctly. Leaving out mii_pollstat() means = that link state changes won't be detected and reported automatically but = only when you run e.g. etherswitchcfg port0. I'm currently looking into iicbb.c, since I believe it is DELAY()ing way = too much (running at effectively 20kHz instead of 100kZh for I2C). I'll = try to speed it up, since the RTL8366RB can go at least at 100kHz. Stefan --=20 Stefan Bethke Fon +49 151 14070811