From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 11 00:07:00 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 677B1106564A for ; Sun, 11 Dec 2011 00:07:00 +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 298D78FC16 for ; Sun, 11 Dec 2011 00:07:00 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 14F6FE2F71 for ; Sun, 11 Dec 2011 01:06:59 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: Date: Sun, 11 Dec 2011 01:06:58 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch 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: Sun, 11 Dec 2011 00:07:00 -0000 Am 05.12.2011 um 00:22 schrieb Stefan Bethke: > Limping along=85 >=20 > You can find a first version of a kernel driver at > http://www.lassitu.de/freebsd/rtl8366rb.c > http://www.lassitu.de/freebsd/rtl8366rbvar.h >=20 > It has no external interface, but it does set up a sensible VLAN = config for the TL-WR1043RB. Here's a much more complete interim version: http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch This is how it looks like: # kldload rtl8366rb rtl8366rb0: at addr 0xa8 on = iicbus0 rtl8366rb0: rev. 3 miibus0: on rtl8366rb0 ukphy0: PHY 0 on miibus0 ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy1: PHY 1 on miibus0 ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy2: PHY 2 on miibus0 ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy3: PHY 3 on miibus0 ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy4: PHY 4 on miibus0 ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto etherswitch0: on rtl8366rb0 # etherswitchcfg etherswitch0: Realtek RTL8366RB with 6 ports and 16 VLAN groups port0: vlangroup=3D1 port1: vlangroup=3D0 port2: vlangroup=3D0 port3: vlangroup=3D0 port4: vlangroup=3D0 port5: vlangroup=3D0 vlangroup0: vid=3D1, member=3D1,2,3,4,5 vlangroup1: vid=3D2, member=3D0,5t Right now, it's only printing information, but I'm hoping to add VLAN = configuration in the next couple of days. The phys are attached to a pseudo interface. I've yet to figure out = which operations are useful on them (I tried successfully to power down = a phy, which has the result of bringing down the link). For the moment, I have decided to ignore Alexsandrs work, since I didn't = manage to figure out how exactly the pieces attach to each other, and I = wasn't happy with the ioctls and the modelling of the virtual switch. = But I'm sure that can be fixed in the next couple of iterations. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 11 10:45:20 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 5CCAB106566B for ; Sun, 11 Dec 2011 10:45:20 +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 1DD748FC0A for ; Sun, 11 Dec 2011 10:45:20 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 959972F25A for ; Sun, 11 Dec 2011 11:45:18 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> Date: Sun, 11 Dec 2011 11:45:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch 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: Sun, 11 Dec 2011 10:45:20 -0000 Am 11.12.2011 um 01:06 schrieb Stefan Bethke: > Am 05.12.2011 um 00:22 schrieb Stefan Bethke: >=20 >> Limping along=85 >>=20 >> You can find a first version of a kernel driver at >> http://www.lassitu.de/freebsd/rtl8366rb.c >> http://www.lassitu.de/freebsd/rtl8366rbvar.h >>=20 >> It has no external interface, but it does set up a sensible VLAN = config for the TL-WR1043RB. >=20 > Here's a much more complete interim version: > http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch I've updated the patch to include commands to set VLAN configuration and = membership. # kldload rtl8366rb rtl8366rb0: at addr 0xa8 on = iicbus0 rtl8366rb0: rev. 3 miibus0: on rtl8366rb0 ukphy0: PHY 0 on miibus0 ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy1: PHY 1 on miibus0 ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy2: PHY 2 on miibus0 ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy3: PHY 3 on miibus0 ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto ukphy4: PHY 4 on miibus0 ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto etherswitch0: on rtl8366rb0 # etherswitchcfg etherswitch0: Realtek RTL8366RB with 6 ports and 16 VLAN groups port0: vlangroup 1 port1: vlangroup 0 port2: vlangroup 0 port3: vlangroup 0 port4: vlangroup 0 port5: vlangroup 0 vlangroup0: vlan 1 members 1,2,3,4,5 vlangroup1: vlan 2 members 0,5t # etherswitchcfg vlangroup2 vlan 1234 members 2,3 port2 vlangroup 2 = port3 vlangroup 3 vlangroup0 members 1,4,5 vlangroup2: vlan 1234 members 2,3 port2: vlangroup 2 port3: vlangroup 3 vlangroup0: vlan 1 members 1,4,5 # etherswitchcfg etherswitch0: Realtek RTL8366RB with 6 ports and 16 VLAN groups port0: vlangroup 0 port1: vlangroup 0 port2: vlangroup 0 port3: vlangroup 3 port4: vlangroup 0 port5: vlangroup 0 vlangroup0: vlan 1 members 1,4,5 vlangroup1: vlan 2 members 0,5t vlangroup2: vlan 1234 members 2,3 The man page is a just s skeleton right now, but I'll work on that in a = bit. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 11 20:28:41 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 53410106564A for ; Sun, 11 Dec 2011 20:28:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0911E8FC08 for ; Sun, 11 Dec 2011 20:28:40 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so5749746vcb.13 for ; Sun, 11 Dec 2011 12:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=YHk9yYemB1qNGgG+P+3lakVxlRVrFAaIHJCEZ8l7N18=; b=P7qFpObongjjdXJsQVlBlKa0mhOE5K0IBdgiwFNGt/CuEwJoQ35oP/do6Y/nggnZI0 z4Jqu0IP7bDcOvYTFfGkbIrEMMH2xzsx0OPvyXlkCWBHhJZrAjnbN8SIVX27z8CXxW8m bLDRWVkVH+eFp5IXXmoVUlJCKOK3NE6ySNqTQ= MIME-Version: 1.0 Received: by 10.52.67.205 with SMTP id p13mr8443221vdt.79.1323635320280; Sun, 11 Dec 2011 12:28:40 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Sun, 11 Dec 2011 12:28:40 -0800 (PST) In-Reply-To: <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Mon, 12 Dec 2011 07:28:40 +1100 X-Google-Sender-Auth: AAeLErxtA9sXvl-JBfv1e6PPdRM Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Sun, 11 Dec 2011 20:28:41 -0000 Hm, so - how does this expose the CPU facing port(s), if any? ray@ is trying to figure out how to expose the arge0/arge1 interface (as he's got at least one board where the switch PHY hangs off of arge1, not arge0) so things are probed/attached "right". That discussion may be worth having here. :) Whats RTL8366RB_SGCR_EN_VLAN_4KTB do? Adrian From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 11 20:54:28 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 4381F106566B; Sun, 11 Dec 2011 20:54:28 +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 02D658FC12; Sun, 11 Dec 2011 20:54:28 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id D51662FEC8; Sun, 11 Dec 2011 21:54:26 +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: Sun, 11 Dec 2011 21:54:26 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Sun, 11 Dec 2011 20:54:28 -0000 Am 11.12.2011 um 21:28 schrieb Adrian Chadd: > Hm, so - how does this expose the CPU facing port(s), if any? >=20 > ray@ is trying to figure out how to expose the arge0/arge1 interface > (as he's got at least one board where the switch PHY hangs off of > arge1, not arge0) so things are probed/attached "right". >=20 > That discussion may be worth having here. :) The RTL8366 family of switches has a GMII interface to hook up an = ethernet controller. MDC/MDIO are not connected to the ethernet = controller, instead register access is through this I2C-like interface, = which on the TL-WR1043ND is through two GPIOs. The RTL8306SD (which is used for example in the Linksys WRT160NL) has = two MII ports. One is always used to connect a CPU, while the second one = can be configured to either communicate with the switch or with one = specific PHY. I believe the WRT160NL uses the latter mode, using the = first ethernet port of the CPU to talk to the switch ("LAN"), and the = second one to the PHY ("WAN"). It exposes both the five PHYs via = MDC/MDIO, as well as switch configuration. Unfortunately, the = configuration registers are spread out over all the PHYs, so you can't = cleanly isolate the PHYs from the switch portion. Since the switch has = only one set of MDC/MDIO, both ethernet controllers share the same = minibus (and both driver instances need to work on just the one = instance). For arge1, using the appropriate phymask should be = sufficient. We already have PHY support for the similar RTL8305 in the tree = (sys/dev/mii/rlswitch.c), which does configure the switch. I haven't = looked at how it handles the multiple exposed PHYs. BTW, would it make sense to put all this info up on a wiki page = somewhere? I'm optimistic that we can flesh the code out in the next = couple of weeks, but it would be sad to bury all the additional = information just in the mailing list archives. > Whats RTL8366RB_SGCR_EN_VLAN_4KTB do? The switch also supports a mode where theres a configuration per VID, so = it can support all possible VIDs (1-4094). I cna add the code, but I = don't think it really adds that many real-world functionality. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 11 23:15:23 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 199E8106566B; Sun, 11 Dec 2011 23:15:23 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 753178FC08; Sun, 11 Dec 2011 23:15:22 +0000 (UTC) Received: by eaaf13 with SMTP id f13so525751eaa.13 for ; Sun, 11 Dec 2011 15:15:21 -0800 (PST) Received: by 10.213.26.137 with SMTP id e9mr3203768ebc.89.1323645321209; Sun, 11 Dec 2011 15:15:21 -0800 (PST) Received: from rnote.ddteam.net (1-43-133-95.pool.ukrtel.net. [95.133.43.1]) by mx.google.com with ESMTPS id 58sm67476391eet.11.2011.12.11.15.15.18 (version=SSLv3 cipher=OTHER); Sun, 11 Dec 2011 15:15:19 -0800 (PST) Date: Mon, 12 Dec 2011 01:15:17 +0200 From: Aleksandr Rybalko To: Stefan Bethke Message-Id: <20111212011517.ff4b390f.ray@ddteam.net> In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> X-Mailer: Sylpheed 3.1.0 (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-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Sun, 11 Dec 2011 23:15:23 -0000 On Sun, 11 Dec 2011 21:54:26 +0100 Stefan Bethke wrote: > Am 11.12.2011 um 21:28 schrieb Adrian Chadd: > > > Hm, so - how does this expose the CPU facing port(s), if any? > > > > ray@ is trying to figure out how to expose the arge0/arge1 interface > > (as he's got at least one board where the switch PHY hangs off of > > arge1, not arge0) so things are probed/attached "right". > > > > That discussion may be worth having here. :) > > The RTL8366 family of switches has a GMII interface to hook up an > ethernet controller. MDC/MDIO are not connected to the ethernet > controller, instead register access is through this I2C-like > interface, which on the TL-WR1043ND is through two GPIOs. > > The RTL8306SD (which is used for example in the Linksys WRT160NL) has > two MII ports. One is always used to connect a CPU, while the second > one can be configured to either communicate with the switch or with > one specific PHY. I believe the WRT160NL uses the latter mode, using > the first ethernet port of the CPU to talk to the switch ("LAN"), and > the second one to the PHY ("WAN"). Heh, just like Atheros AR724x family :) > It exposes both the five PHYs via > MDC/MDIO, as well as switch configuration. Unfortunately, the > configuration registers are spread out over all the PHYs, so you > can't cleanly isolate the PHYs from the switch portion. Since the > switch has only one set of MDC/MDIO, both ethernet controllers share > the same minibus (and both driver instances need to work on just the > one instance). For arge1, using the appropriate phymask should be > sufficient. > > We already have PHY support for the similar RTL8305 in the tree > (sys/dev/mii/rlswitch.c), which does configure the switch. I haven't > looked at how it handles the multiple exposed PHYs. > > BTW, would it make sense to put all this info up on a wiki page > somewhere? I'm optimistic that we can flesh the code out in the next > couple of weeks, but it would be sad to bury all the additional > information just in the mailing list archives. > > > Whats RTL8366RB_SGCR_EN_VLAN_4KTB do? > > The switch also supports a mode where theres a configuration per VID, > so it can support all possible VIDs (1-4094). I cna add the code, > but I don't think it really adds that many real-world functionality. > > > Stefan > > -- > Stefan Bethke Fon +49 151 14070811 > > > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to > "freebsd-embedded-unsubscribe@freebsd.org" P.S. Stefan, I was add some description for switch framework, hope it will clear a bit how it works :) http://zrouter.org/hg/FreeBSD/head/file/default/head/sys/dev/switch/README WBW -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 00:32:24 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 082581065673 for ; Mon, 12 Dec 2011 00:32:24 +0000 (UTC) (envelope-from garmitage@swin.edu.au) Received: from gpo2.cc.swin.edu.au (gpo2.cc.swin.edu.au [136.186.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0C18FC0A for ; Mon, 12 Dec 2011 00:32:23 +0000 (UTC) Received: from [136.186.229.44] (garmitage3.caia.swin.edu.au [136.186.229.44]) by gpo2.cc.swin.edu.au (8.14.3/8.14.3) with ESMTP id pBC0WLsD004793 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 12 Dec 2011 11:32:21 +1100 Message-ID: <4EE54B95.10608@swin.edu.au> Date: Mon, 12 Dec 2011 11:32:21 +1100 From: grenville armitage User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Thanks for the WR1043ND work! 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: Mon, 12 Dec 2011 00:32:24 -0000 All, I'd like to chime in here and say "thank you" to everyone who has taken an interest in getting FreeBSD working on the TP-Link WR1043ND! My group is currently setting up five of them as consumer network nodes for our experiments with DIFFUSE (http://caia.swin.edu.au/freebsd/diffused/), so having them run FreeBSD is very cool. I'm hopeful (but not sure) that we'll be able to contribute some patches back to the community in Jan/Feb 2012, once my intern comes up to speed on this platform. (I have another dream -- FreeBSD on the TP-Link WR703N, but that is sometime in a future where the kernel is much smaller! :) ) cheers, gja From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 10:28:31 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 22411106566B for ; Mon, 12 Dec 2011 10:28:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C8AF28FC13 for ; Mon, 12 Dec 2011 10:28:30 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so6219356vbb.13 for ; Mon, 12 Dec 2011 02:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qfmI6Ft6azIHu9ee9BLf7abaYQuaLxP78RTUkuvorlY=; b=O+99CbkvUT7wIydy2YGskVbYd3JJvioOfbkiucGFCfMFD7WX2jMG1xvI3N3lxKH9Yq F6z2WWo/7NHPmNHo+hppzZn41Qnmb8wTIALqrzCqMVgqHM20S/RzsyXZZIcz/D0zKU/X dzmkPX4bduoIY6jqLvjHvdjEPfEssICK/AGnY= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr9284777vdb.113.1323685710014; Mon, 12 Dec 2011 02:28:30 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Mon, 12 Dec 2011 02:28:29 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Mon, 12 Dec 2011 02:28:29 -0800 X-Google-Sender-Auth: 8YzR6wWeXgrnEWPUuKgnfP9Fydk Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 10:28:31 -0000 (bah, being in the wrong timezone sucks.) On 11 December 2011 12:54, Stefan Bethke wrote: > Am 11.12.2011 um 21:28 schrieb Adrian Chadd: > >> Hm, so - how does this expose the CPU facing port(s), if any? >> >> ray@ is trying to figure out how to expose the arge0/arge1 interface >> (as he's got at least one board where the switch PHY hangs off of >> arge1, not arge0) so things are probed/attached "right". >> >> That discussion may be worth having here. :) > > The RTL8366 family of switches has a GMII interface to hook up an etherne= t controller. =A0MDC/MDIO are not connected to the ethernet controller, ins= tead register access is through this I2C-like interface, which on the TL-WR= 1043ND is through two GPIOs. Right. So all the PHY access/glue has to come out of this i2c style bus. > The RTL8306SD (which is used for example in the Linksys WRT160NL) has two= MII ports. One is always used to connect a CPU, while the second one can b= e configured to either communicate with the switch or with one specific PHY= . > I believe the WRT160NL uses the latter mode, using the first ethernet por= t of the CPU to talk to the switch ("LAN"), and the second one to the PHY (= "WAN"). It exposes both the five PHYs via MDC/MDIO, as well as switch confi= guration. =A0Unfortunately, the configuration registers are spread out over= all the PHYs, so you can't cleanly isolate the PHYs from the switch portio= n. =A0Since the switch has only one set of MDC/MDIO, both ethernet controll= ers share the same minibus (and both driver instances need to work on just = the one instance). =A0For arge1, using the appropriate phymask should be su= fficient. Right. This I think is one of those places where it gets ugly. > We already have PHY support for the similar RTL8305 in the tree (sys/dev/= mii/rlswitch.c), which does configure the switch. =A0I haven't looked at ho= w it handles the multiple exposed PHYs. > > BTW, would it make sense to put all this info up on a wiki page somewhere= ? =A0I'm optimistic that we can flesh the code out in the next couple of we= eks, but it would be sad to bury all the additional information just in the= mailing list archives. I'm happy for you to do this. Create a wiki.freebsd.org account and tell me what your username is; I'll then throw your account into the right group to let you modify things. >> Whats RTL8366RB_SGCR_EN_VLAN_4KTB do? > > The switch also supports a mode where theres a configuration per VID, so = it can support all possible VIDs (1-4094). =A0I cna add the code, but I don= 't think it really adds that many real-world functionality. Well, as a network engineer of sorts, I'd like to be able to glue these devices into the full VLAN space. I have a habit at home of using VLANs in ranges, so I tend to use VLANs right up to 4000. :) How difficult does it look? Does it change how the VLANs are actually configured? Adrian From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 10:35:36 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 399841065672 for ; Mon, 12 Dec 2011 10:35:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id E1E0D8FC15 for ; Mon, 12 Dec 2011 10:35:35 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so6249731vcb.13 for ; Mon, 12 Dec 2011 02:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=lDToC9uy9Aebu0+pVbuyLxtUcXyxbGNHWGW5OIB6GCQ=; b=KwuSZ5Kwqn2QjCubCQs3RvlQYtNOrDeErlgrlV2mv7/T1bjXndM0IgYGKx5NdPmIVd nZLYCb+ESapywhrAk2IU/BFLDADMHBl1M/T/YbIBYCHaX4RL8vzSId2+nBQ+lZy9vkW3 T7a2YasliWpErR9B/6k5M/fyRuyt+iUHpgOcs= MIME-Version: 1.0 Received: by 10.52.67.111 with SMTP id m15mr9298578vdt.96.1323686135282; Mon, 12 Dec 2011 02:35:35 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Mon, 12 Dec 2011 02:35:35 -0800 (PST) In-Reply-To: <20111212011517.ff4b390f.ray@ddteam.net> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <20111212011517.ff4b390f.ray@ddteam.net> Date: Mon, 12 Dec 2011 02:35:35 -0800 X-Google-Sender-Auth: OYM0FuToCHBx7RgiXpC7z3j_pW0 Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 10:35:36 -0000 Ray, How does your userland switch configuration tool work? The one that doesn't use the switch API you've designed? I'm wondering if we shouldn't just make the first stage of this be: * Add the glue needed to detect and setup the switch/phy, expose the PHY state and PHY register operations; * fix if_arge to allow this to happen in a not so dirty fashion (ie, remove the arge0/arge1 hard coded distinction, pushing it all into hints); * do the minimum needed to support the setup where arge1 has the switch PHY, and all the odd probing issues that entails; * do the switch configuration via userland for now, rather than the switch API. Since these switch PHYs have a very large set of possible operating modes (including all kinds of L2/L3/L4 ACL modes that we haven't even begun to address, let alone devices which implement hardware NAT) I think the best thing to do right now is the minimum set of stuff needed, then do the rest via userland. As long as the PHY port state is exposed and there is some way to program the arge{0,1} MII mode, clock speed, port speed and port duplex, I think we'll be fine. I'd still like to eventually implement a switch API but I'm concerned about the amount of time it'll take to get it "right", along with all the subsequent features which vary quite wildly with devices. We may end up having to code up a way of implementing (opaque) extensions (so the switch PHY layer doesn't need to know about NAT, for example, but natd can program in rules as needed; same deal for hardware ACLs and QoS), and this may get messy. What do you think? Juli/Warner, what do you two think? Adrian From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 10:43:52 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 025D7106564A; Mon, 12 Dec 2011 10:43:52 +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 B37C88FC0A; Mon, 12 Dec 2011 10:43:51 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 59C704CCC5; Mon, 12 Dec 2011 11:43:50 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: Date: Mon, 12 Dec 2011 11:43:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 10:43:52 -0000 Am 12.12.2011 um 11:28 schrieb Adrian Chadd: >>> Whats RTL8366RB_SGCR_EN_VLAN_4KTB do? >>=20 >> The switch also supports a mode where theres a configuration per VID, = so it can support all possible VIDs (1-4094). I cna add the code, but I = don't think it really adds that many real-world functionality. >=20 > Well, as a network engineer of sorts, I'd like to be able to glue > these devices into the full VLAN space. I have a habit at home of > using VLANs in ranges, so I tend to use VLANs right up to 4000. :) >=20 > How difficult does it look? Does it change how the VLANs are actually > configured? Are you using more than 16 distinct VLANs on these devices? That's the = limitation in "16 VLAN groups" mode. You can still use any VID you'd = like. If you do need to have access to more than 16 distinct VLANs, then the = full VLAN table mode would be necessary. (I have five VLANs at home: cable modem, DSL, internal 9k MTU LAN, = internal standard LAN plus wireless, and guest network. Even adding a = few more for, say, the blueray player or VOD settop box, I can't see = myself using more than 16.) Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 11:07:20 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 CD998106568C for ; Mon, 12 Dec 2011 11:07:20 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BB2DE8FC25 for ; Mon, 12 Dec 2011 11:07:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBCB7KLr029971 for ; Mon, 12 Dec 2011 11:07:20 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBCB7Km7029969 for freebsd-embedded@FreeBSD.org; Mon, 12 Dec 2011 11:07:20 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Dec 2011 11:07:20 GMT Message-Id: <201112121107.pBCB7Km7029969@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org 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: Mon, 12 Dec 2011 11:07:20 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 2 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 14:50:57 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 096FF106564A; Mon, 12 Dec 2011 14:50:57 +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 B92DD8FC20; Mon, 12 Dec 2011 14:50:56 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 834594FDB4; Mon, 12 Dec 2011 15:50:55 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: Date: Mon, 12 Dec 2011 15:50:54 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd , Aleksandr Rybalko X-Mailer: Apple Mail (2.1084) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 14:50:57 -0000 Am 12.12.2011 um 11:28 schrieb Adrian Chadd: >> The RTL8366 family of switches has a GMII interface to hook up an = ethernet controller. MDC/MDIO are not connected to the ethernet = controller, instead register access is through this I2C-like interface, = which on the TL-WR1043ND is through two GPIOs. >=20 > Right. So all the PHY access/glue has to come out of this i2c style = bus. >=20 >> The RTL8306SD (which is used for example in the Linksys WRT160NL) has = two MII ports. One is always used to connect a CPU, while the second one = can be configured to either communicate with the switch or with one = specific PHY. >=20 >> I believe the WRT160NL uses the latter mode, using the first ethernet = port of the CPU to talk to the switch ("LAN"), and the second one to the = PHY ("WAN"). It exposes both the five PHYs via MDC/MDIO, as well as = switch configuration. Unfortunately, the configuration registers are = spread out over all the PHYs, so you can't cleanly isolate the PHYs from = the switch portion. Since the switch has only one set of MDC/MDIO, both = ethernet controllers share the same minibus (and both driver instances = need to work on just the one instance). For arge1, using the = appropriate phymask should be sufficient. >=20 > Right. This I think is one of those places where it gets ugly. I've looked at the miibus code a bit more, and I think it's necessary to = decide about the (implied) semantics. With a standard Ethernet card, you have the MAC, a MDC/MDIO bus, and one = or more PHYs connected to the MAC. Our current miibus seems to work = with this model, and assumes that only one PHY can be active at any = time, which makes sense if there's only a single MAC. With the switch controllers, these assumptions are not correct anymore. = We still have multiple PHYs that are connected to one MDC/MDIO bus, but = the MII lines are not shared between the switch MACs and the PHYs, as = there's a one-to-one relationship between MACs and PHYs. (Ignoring the = complications of reconfigurable ports for the moment.) My current thinking is that there should be an miibus instance per = switch port, with a single PHY attached to it. All these miibus = instances talk to the same MDC/MDIO interface, but attach only one of = the PHYs accessible through it. I haven't checked what locking = implications this has on the miibus_if device (usually the Ethernet = driver). For my RTL8366RB, that's straight-forward to implement. For the PHY = switch controllers like the RTL8306SD the miibusses should be split = between the MAC (for the "WAN" port) and the switch (for the "LAN" = ports). I'm not sure when and where these additional busses would be = instantiated and probed. The miibus code also assumes that it is always attached to something = that has a struct ifnet. In my RTL8366RB driver, I'm creating one = myself, but I'm not sure what side effects this might have. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 20:37:40 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 B22911065673 for ; Mon, 12 Dec 2011 20:37:40 +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 6187C8FC16 for ; Mon, 12 Dec 2011 20:37:40 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 3CBA05579C for ; Mon, 12 Dec 2011 21:37:39 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Mon, 12 Dec 2011 21:37:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 20:37:40 -0000 Am 11.12.2011 um 11:45 schrieb Stefan Bethke: > Am 11.12.2011 um 01:06 schrieb Stefan Bethke: >=20 >> Am 05.12.2011 um 00:22 schrieb Stefan Bethke: >>=20 >>> Limping along=85 >>>=20 >>> You can find a first version of a kernel driver at >>> http://www.lassitu.de/freebsd/rtl8366rb.c >>> http://www.lassitu.de/freebsd/rtl8366rbvar.h >>>=20 >>> It has no external interface, but it does set up a sensible VLAN = config for the TL-WR1043RB. >>=20 >> Here's a much more complete interim version: >> http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch >=20 > I've updated the patch to include commands to set VLAN configuration = and membership. Further update to the patch: every phy is now on it's own minibus, the = PHYs received a tick every second (enabling link status changes to the = console), and I've added code to query and print the current media = status (more or less lifted from ifconfig). # kldload rtl8366rb rtl8366rb0: at addr 0xa8 on = iicbus0 rtl8366rb0: rev. 3 miibus0: on rtl8366rb0 ukphy0: PHY 0 on miibus0 ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus1: on rtl8366rb0 ukphy1: PHY 1 on miibus1 ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus2: on rtl8366rb0 ukphy2: PHY 2 on miibus2 ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus3: on rtl8366rb0 ukphy3: PHY 3 on miibus3 ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus4: on rtl8366rb0 ukphy4: PHY 4 on miibus4 ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto etherswitch0: on rtl8366rb0 rtl8366rb0port0: link state changed to DOWN rtl8366rb0port1: link state changed to DOWN rtl8366rb0port2: link state changed to DOWN rtl8366rb0port3: link state changed to DOWN rtl8366rb0port4: link state changed to DOWN rtl8366rb0port0: link state changed to UP rtl8366rb0port1: link state changed to UP # etherswitchcfg etherswitch0: Realtek RTL8366RB with 6 ports and 16 VLAN groups port0 vlangroup 1 media Ethernet autoselect (10baseT/UTP = ) status active port1 vlangroup 0 media Ethernet autoselect (1000baseT = ) status active port2 vlangroup 0 media Ethernet autoselect (none) status no = carrier port3 vlangroup 0 media Ethernet autoselect (none) status no = carrier port4 vlangroup 0 media Ethernet autoselect (none) status no = carrier port5 vlangroup 0 media Ethernet 1000baseT status = active vlangroup0 vlan 1 members 1,2,3,4,5 vlangroup1 vlan 2 members 0,5t Port 0 is set to 10baseT half-duplex on the other side of the link, so = this is the result of auto negotiation. I'll add code to also set the = media on the switch side soon. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 12 23:48:29 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 9AF42106564A for ; Mon, 12 Dec 2011 23:48:29 +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 59C938FC08 for ; Mon, 12 Dec 2011 23:48:29 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 42E3255DC5 for ; Tue, 13 Dec 2011 00:48:28 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: Date: Tue, 13 Dec 2011 00:48:27 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch 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: Mon, 12 Dec 2011 23:48:29 -0000 http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch Another update: I can now set media and mediaopt: # kldload rtl8366rb rtl8366rb0: at addr 0xa8 on = iicbus0 rtl8366rb0: rev. 3 miibus0: on rtl8366rb0 ukphy0: PHY 0 on miibus0 ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus1: on rtl8366rb0 ukphy1: PHY 1 on miibus1 ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus2: on rtl8366rb0 ukphy2: PHY 2 on miibus2 ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus3: on rtl8366rb0 ukphy3: PHY 3 on miibus3 ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto miibus4: on rtl8366rb0 ukphy4: PHY 4 on miibus4 ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, = 1000baseT-FDX, 1000baseT-FDX-master, auto etherswitch0: on rtl8366rb0 rtl8366rb0port0: link state changed to DOWN rtl8366rb0port1: link state changed to DOWN rtl8366rb0port2: link state changed to DOWN rtl8366rb0port3: link state changed to DOWN rtl8366rb0port4: link state changed to DOWN rtl8366rb0port0: link state changed to UP rtl8366rb0port1: link state changed to UP # etherswitchcfg=20 port0: vlangroup: 1 media: Ethernet autoselect (1000baseT ) status: active port1: vlangroup: 0 media: Ethernet autoselect (1000baseT ) status: active port2: vlangroup: 0 media: Ethernet autoselect (none) status: no carrier port3: vlangroup: 0 media: Ethernet autoselect (none) status: no carrier port4: vlangroup: 0 media: Ethernet autoselect (none) status: no carrier port5: vlangroup: 0 media: Ethernet 1000baseT status: active vlangroup0: vlan: 1 members 1,2,3,4,5 vlangroup1: vlan: 2 members 0,5t # etherswitchcfg port0 media 100basetx mediaopt fdx rtl8366rb0port0: link state changed to DOWN port0: vlangroup: 1 media: Ethernet 100baseTX status: no carrier rtl8366rb0port0: link state changed to UP The code now reuses the if_media.c ioctl code on the kernel side, so = it's fairly compact. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 01:39:06 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 6D3AD106566B for ; Tue, 13 Dec 2011 01:39:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1EB1B8FC13 for ; Tue, 13 Dec 2011 01:39:05 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so7248368vbb.13 for ; Mon, 12 Dec 2011 17:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EgVzEKpVyNcDfZhtais1dRc9Kjg/UbUIklF5RUzVyuE=; b=i3mEw+aIGb6E5vEucUsyytcOfzZGX8vVGeEAE25s/QW89iLncgENGFfjjsh7eBnNIa AZmfsZvhtLbAZpCOacwX9546dntcM6fIYP+Zw/b6S1aLiI1rZkBKdZS25l6t1nsjwsWp UXrxwC4TJYTcgzsIqZZhueeyI65n/v9fUY1To= MIME-Version: 1.0 Received: by 10.52.175.9 with SMTP id bw9mr286050vdc.130.1323740345054; Mon, 12 Dec 2011 17:39:05 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Mon, 12 Dec 2011 17:39:04 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Mon, 12 Dec 2011 17:39:04 -0800 X-Google-Sender-Auth: ME1E6plQFWszd9ww7D0-IInXgac Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 01:39:06 -0000 Hi, What's the CPU facing port in this configuration? >From what I understand, CPU facing port(s) are always the same though, right? Since the switch PHY generally has one or two dedicated ports marked for the purpose. I just wonder how you're configuring both the arge0 side of things and the switch PHY side of things. Does the arge0 "phy" map to a specific switch port phy, for general configuration and status? Or is it totally separate here (requiring configuration of rtl8366rb0portX ?) Thanks, Adrian On 12 December 2011 12:37, Stefan Bethke wrote: > > Am 11.12.2011 um 11:45 schrieb Stefan Bethke: > >> Am 11.12.2011 um 01:06 schrieb Stefan Bethke: >> >>> Am 05.12.2011 um 00:22 schrieb Stefan Bethke: >>> >>>> Limping along=85 >>>> >>>> You can find a first version of a kernel driver at >>>> http://www.lassitu.de/freebsd/rtl8366rb.c >>>> http://www.lassitu.de/freebsd/rtl8366rbvar.h >>>> >>>> It has no external interface, but it does set up a sensible VLAN confi= g for the TL-WR1043RB. >>> >>> Here's a much more complete interim version: >>> http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch >> >> I've updated the patch to include commands to set VLAN configuration and= membership. > Further update to the patch: every phy is now on it's own minibus, the PH= Ys received a tick every second (enabling link status changes to the consol= e), and I've added code to query and print the current media status (more o= r less lifted from ifconfig). > > # kldload rtl8366rb > rtl8366rb0: at addr 0xa8 on iicbus= 0 > rtl8366rb0: rev. 3 > miibus0: on rtl8366rb0 > ukphy0: PHY 0 on miibus0 > ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 > ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000base= T-FDX, 1000baseT-FDX-master, auto > miibus1: on rtl8366rb0 > ukphy1: PHY 1 on miibus1 > ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 > ukphy1: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000base= T-FDX, 1000baseT-FDX-master, auto > miibus2: on rtl8366rb0 > ukphy2: PHY 2 on miibus2 > ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 > ukphy2: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000base= T-FDX, 1000baseT-FDX-master, auto > miibus3: on rtl8366rb0 > ukphy3: PHY 3 on miibus3 > ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 > ukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000base= T-FDX, 1000baseT-FDX-master, auto > miibus4: on rtl8366rb0 > ukphy4: PHY 4 on miibus4 > ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 > ukphy4: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000base= T-FDX, 1000baseT-FDX-master, auto > etherswitch0: on rtl8366rb0 > rtl8366rb0port0: link state changed to DOWN > rtl8366rb0port1: link state changed to DOWN > rtl8366rb0port2: link state changed to DOWN > rtl8366rb0port3: link state changed to DOWN > rtl8366rb0port4: link state changed to DOWN > rtl8366rb0port0: link state changed to UP > rtl8366rb0port1: link state changed to UP > > # etherswitchcfg > etherswitch0: Realtek RTL8366RB with 6 ports and 16 VLAN groups > =A0 =A0 =A0 =A0port0 vlangroup 1 media Ethernet autoselect (10baseT/UTP <= half-duplex>) status active > =A0 =A0 =A0 =A0port1 vlangroup 0 media Ethernet autoselect (1000baseT ) status active > =A0 =A0 =A0 =A0port2 vlangroup 0 media Ethernet autoselect (none) status = no carrier > =A0 =A0 =A0 =A0port3 vlangroup 0 media Ethernet autoselect (none) status = no carrier > =A0 =A0 =A0 =A0port4 vlangroup 0 media Ethernet autoselect (none) status = no carrier > =A0 =A0 =A0 =A0port5 vlangroup 0 media Ethernet 1000baseT s= tatus active > =A0 =A0 =A0 =A0vlangroup0 vlan 1 members 1,2,3,4,5 > =A0 =A0 =A0 =A0vlangroup1 vlan 2 members 0,5t > > > Port 0 is set to 10baseT half-duplex on the other side of the link, so th= is is the result of auto negotiation. =A0I'll add code to also set the medi= a on the switch side soon. > > > Stefan > > -- > Stefan Bethke =A0 Fon +49 151 14070811 > > > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.or= g" From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 01:41:50 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 6F99E1065672 for ; Tue, 13 Dec 2011 01:41:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 25D1D8FC0C for ; Tue, 13 Dec 2011 01:41:49 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so7250188vbb.13 for ; Mon, 12 Dec 2011 17:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=5/IYOJ4TF3KSZ5rOQ88KykzHN8odjkAvygozGa4j0F4=; b=XsGDP28HNeeqZ7Jnv1u0pO43n8S3GMqCNVS9rnaKR0rLBRXztZCc4lpmdmJLFmy5eI uv8CwV7s7W4W4qj+Mj40O+jEMzOopi5ZHe9t/xAHLdMEE7tdqNEQJP5MAjRW8v/3hM0F npWuUt1TPyVi0OEF+ayZiMxR4uw2IBSmppcLs= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr286890vdb.113.1323740509481; Mon, 12 Dec 2011 17:41:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Mon, 12 Dec 2011 17:41:49 -0800 (PST) In-Reply-To: <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> Date: Mon, 12 Dec 2011 17:41:49 -0800 X-Google-Sender-Auth: xe62L2bzjxbhJjBNohovocKGPVk Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 01:41:50 -0000 Hm, it seems your etherswitchcfg code is reusing code from ifconfig? Or is that code from ray? Just a nitpick, we should likely avoid that code duplication and either roll this into ifconfig, or should we just break out the ifconfig related code into a shared library and reuse that? Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 07:54:11 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 D4FFD1065673; Tue, 13 Dec 2011 07:54:11 +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 932EE8FC08; Tue, 13 Dec 2011 07:54:11 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 224E0571CE; Tue, 13 Dec 2011 08:54:10 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: Date: Tue, 13 Dec 2011 08:54:09 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 07:54:11 -0000 Am 13.12.2011 um 02:39 schrieb Adrian Chadd: > Hi, >=20 > What's the CPU facing port in this configuration? >=20 > =46rom what I understand, CPU facing port(s) are always the same = though, > right? Since the switch PHY generally has one or two dedicated ports > marked for the purpose. I just wonder how you're configuring both the > arge0 side of things and the switch PHY side of things. >=20 > Does the arge0 "phy" map to a specific switch port phy, for general > configuration and status? Or is it totally separate here (requiring > configuration of rtl8366rb0portX ?) There is no PHY connected to arge0, just the switch MAC. I believe the = RTL8366RB configures the CPU port (port 5) through pin strapping on = power up. My code only return the current configuration, but does not = allow you to change it. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 08:00:51 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 E77001065673; Tue, 13 Dec 2011 08:00:51 +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 A54818FC08; Tue, 13 Dec 2011 08:00:51 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id F32265729B; Tue, 13 Dec 2011 09:00:50 +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: Tue, 13 Dec 2011 09:00:50 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 08:00:52 -0000 Am 13.12.2011 um 02:41 schrieb Adrian Chadd: > Hm, it seems your etherswitchcfg code is reusing code from ifconfig? > Or is that code from ray? >=20 > Just a nitpick, we should likely avoid that code duplication and > either roll this into ifconfig, or should we just break out the > ifconfig related code into a shared library and reuse that? Ultimately, that would be the correct way. I'd start working on that = once it's clear that this is the way forward. Integrating the switch configuration code into ifconfig has crossed my = mind, but I think the overlap is too small to make sense. While the = media code manipulates the same data structures (struct ifreq, struct = ifmediareq), the ioctls are completely different, so much of the = ifconfig infrastructure is actually in the way. I'm using sbin/ifconfig/if_media.c unchanged except for exporting some = of the low level functions for printing and parsing media and mediaopt. = I'm not certain where this code would go to be shared efficiently. = Also, wherever it goes ifconfig still needs to be buildable for /rescue. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 10:02:03 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 AE4521065670 for ; Tue, 13 Dec 2011 10:02:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5875B8FC08 for ; Tue, 13 Dec 2011 10:02:02 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so7630336vbb.13 for ; Tue, 13 Dec 2011 02:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=JG21OiGnPOA7nQ5tqIEq7L77r6ZP3vpDV2a/piCcNf0=; b=lM2qnYuiNZkdE1oIB+PKuJLWq/pkjwEaZsDcP0CGjdmh96z1g7pL+B6jVO55Qghlfd cGcCz26QjPV8msvvT+WETiXsWONHvaa7HzVj/rwQDhjbYUWdKWvaK+j8rxvAejVXi8MK 6t3XLvxrAj9GFPfJe1jQh/wDTSVIRc6XCv4WI= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr806452vdb.113.1323770522358; Tue, 13 Dec 2011 02:02:02 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Tue, 13 Dec 2011 02:02:02 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Tue, 13 Dec 2011 02:02:02 -0800 X-Google-Sender-Auth: DlHFvdX_XSEc4IWCN0Tx_Uj9eOA Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 10:02:03 -0000 On 12 December 2011 23:54, Stefan Bethke wrote: >> Does the arge0 "phy" map to a specific switch port phy, for general >> configuration and status? Or is it totally separate here (requiring >> configuration of rtl8366rb0portX ?) > > There is no PHY connected to arge0, just the switch MAC. =A0I believe the= RTL8366RB configures the CPU port (port 5) through pin strapping on power = up. =A0My code only return the current configuration, but does not allow yo= u to change it. Ok. So what's arge0's PHY configuration coming from? Or is it being handled as a multi-phy, where it forces speed/duplex (and MAC PLL + MII clock but I have to fix that for ar71xx/ar724x) and then just nails the port as always up, rather than binding a phy instance to it? Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 10:03:19 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 BA1D0106564A; Tue, 13 Dec 2011 10:03:19 +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 769758FC12; Tue, 13 Dec 2011 10:03:19 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id A718C5767A; Tue, 13 Dec 2011 11:03:18 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: Date: Tue, 13 Dec 2011 11:03:17 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 10:03:19 -0000 Am 13.12.2011 um 11:02 schrieb Adrian Chadd: > On 12 December 2011 23:54, Stefan Bethke wrote: >>> Does the arge0 "phy" map to a specific switch port phy, for general >>> configuration and status? Or is it totally separate here (requiring >>> configuration of rtl8366rb0portX ?) >>=20 >> There is no PHY connected to arge0, just the switch MAC. I believe = the RTL8366RB configures the CPU port (port 5) through pin strapping on = power up. My code only return the current configuration, but does not = allow you to change it. >=20 > Ok. So what's arge0's PHY configuration coming from? Or is it being > handled as a multi-phy, where it forces speed/duplex (and MAC PLL + > MII clock but I have to fix that for ar71xx/ar724x) and then just > nails the port as always up, rather than binding a phy instance to it? It's hard-wired on both ends, the PHY MAC and the arge MAC. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 10:06:47 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 A6D9D106566B for ; Tue, 13 Dec 2011 10:06:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 502DE8FC17 for ; Tue, 13 Dec 2011 10:06:47 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so7635145vbb.13 for ; Tue, 13 Dec 2011 02:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=4u3WL57uG9uDaY6zZetPvK5traYipUQouL9btWhmJKM=; b=YSzItxsJNmJEVUKu3sL88G549SE/db+oz/LplmF5trwNCxv8zvhS/4QX2Fk1MEqkEB RRiI7qMvAzDSDCHhkiTFt4KIGnGCk7xJOzTdqskC1MbZ6qT+tp+l4NBUM1TajfUDgIye 9c7GPv44gnydEM2qPawm0RMZx+fFNm/Myl0bE= MIME-Version: 1.0 Received: by 10.52.20.165 with SMTP id o5mr193809vde.79.1323770806653; Tue, 13 Dec 2011 02:06:46 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Tue, 13 Dec 2011 02:06:46 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> Date: Tue, 13 Dec 2011 02:06:46 -0800 X-Google-Sender-Auth: EveifAJE10azNqKobhSrj-WxszA Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 10:06:47 -0000 On 13 December 2011 02:03, Stefan Bethke wrote: >> Ok. So what's arge0's PHY configuration coming from? Or is it being >> handled as a multi-phy, where it forces speed/duplex (and MAC PLL + >> MII clock but I have to fix that for ar71xx/ar724x) and then just >> nails the port as always up, rather than binding a phy instance to it? > > It's hard-wired on both ends, the PHY MAC and the arge MAC. Ok. I'll have to review this a bit further, along with ray's switch interface work. Hopefully we can tidy up something and get it into -HEAD. The trouble ray is having at the moment is where the switch PHY hangs off of arge1, rather than arge0. This means that arge0 gets probed and has no PHY; then arge1 gets probed and has the switch PHY. I'd rather (for now) just have arge0 be "hard" coded up to something and use the switch API to configure the switch ports themselves. If that works (well enough for now) then we can just get the switch code + drivers into -HEAD and get it all polished. Thanks for chasing this up! I really appreciate it. FYI: I'm working on the GPIO stuff now. I'll try to get the rest of the GPIO code changes into -HEAD by the weekend so we can use all the GPIO lines on each of our boards, along with being able to override the GPIO function register. Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 10:40:02 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 314E51065689; Tue, 13 Dec 2011 10:40:02 +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 CB7768FC22; Tue, 13 Dec 2011 10:40:01 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 9682B57AAA; Tue, 13 Dec 2011 11:40:00 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: Date: Tue, 13 Dec 2011 11:40:00 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <5375D2AF-C886-4DB0-A331-39363562D2B4@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 10:40:02 -0000 Am 13.12.2011 um 11:06 schrieb Adrian Chadd: > The trouble ray is having at the moment is where the switch PHY hangs > off of arge1, rather than arge0. This means that arge0 gets probed and > has no PHY; then arge1 gets probed and has the switch PHY. I'd rather > (for now) just have arge0 be "hard" coded up to something and use the > switch API to configure the switch ports themselves. If that works > (well enough for now) then we can just get the switch code + drivers > into -HEAD and get it all polished. I think it's time for some ASCII art :-) If I understand correctly how ray@s device is connected, it looks like = this: Switch arge +------+ MII +------+ | PHY4 |-------------------------| MAC1 | +------+ +------+ +------+ +------+---+------+ +------+ | PHY3 |---| MAC3 | | MAC4 |---| MAC0 | +------+ +------+ +------+ +------+ +------+ +------+ | | PHY2 |---| MAC2 | | +------+ +------+ Switch | +------+ +------+ core | MDC/MDIO | PHY1 |---| MAC2 | |----------- +------+ +------+ | +------+ +------+ | | PHY0 |---| MAC0 | | +------+ +------+----------+ (The actual unit numbers might be different.) PHY4 is directly attache to arg1, so we can use the standard miibus = attachment for that. However, the same MDC/MDIO bus is also used to configure the switch and = PHYs 0 to 3, so clearly arge1 should not look at those PHYs and their = registers. In my RTL8366RB driver, I've added an additional miibus for each of the = PHYs attached to the switch core, and a struct ifnet to match. I = believe that is the correct answer here as well, since arge0 has no PHY = when communicating with MAC4 of the switch, and likely will be hardwired = for the maximum speed the switch port supports. I think the question is: how can we hang a switch controller off arge0's = miibus when it does not represent any actual PHY that arge0 could = manipulate for it's own MAC and MII interface? For arge1 and PHY4, we can attach ukphy or one of the standard phy = drivers. For the switch, the switch driver should present itself as a = phy, but with only the hardwired media selection available, i. e. not = actually talking to PHY0 to PHY3. Through the switch management = interface, it can then expose those PHYs. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 11:16:03 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 1400C1065670 for ; Tue, 13 Dec 2011 11:16:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id AFBE78FC1D for ; Tue, 13 Dec 2011 11:16:02 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so7705511vbb.13 for ; Tue, 13 Dec 2011 03:16:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=+fYEiQAMXwvQJJ3G+7EuDA6wZCkGoTwb/DW5BGLpDe4=; b=cqPc5Muours80KFnWR5jFUKwFdUafAOIPWdu0GwulUCv0Z70DTKng/VbezikuS7/R0 iJNPWnTgsnihemi1b3yXpUFkcxfRbiwv//eMstKE6CBzPCLQYnFVjqFNO5GUEkRyrZ3d sgdR+TUAJPMhGdWYHWmNG4Q1AX0tkKK6AmoYs= MIME-Version: 1.0 Received: by 10.52.67.111 with SMTP id m15mr912977vdt.96.1323774961883; Tue, 13 Dec 2011 03:16:01 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Tue, 13 Dec 2011 03:16:01 -0800 (PST) In-Reply-To: <5375D2AF-C886-4DB0-A331-39363562D2B4@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <5375D2AF-C886-4DB0-A331-39363562D2B4@lassitu.de> Date: Tue, 13 Dec 2011 03:16:01 -0800 X-Google-Sender-Auth: w0WoE39wUeLfMZZQj9-UBlcOWD0 Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 11:16:03 -0000 >From what ray just said to me on IRC: 19:13 <@rayddteam> arge0 (for DIR-615_E4) attached to isolated(from switch) PHY4 So hm, does this mean that the PHY which arge0 is using isn't even _on_ the arge0 mii bus? Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 15:45:56 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 CA1CF106566B; Tue, 13 Dec 2011 15:45:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD8E8FC14; Tue, 13 Dec 2011 15:45:56 +0000 (UTC) Received: from [10.0.0.150] (150.imp.bsdimp.com [10.0.0.150] (may be forged)) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pBDFf1Ub061614 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 13 Dec 2011 08:41:04 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> Date: Tue, 13 Dec 2011 08:41:01 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> To: Stefan Bethke X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 13 Dec 2011 08:41:04 -0700 (MST) Cc: Adrian Chadd , freebsd-embedded@FreeBSD.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 15:45:56 -0000 On Dec 13, 2011, at 1:00 AM, Stefan Bethke wrote: >=20 > Am 13.12.2011 um 02:41 schrieb Adrian Chadd: >=20 >> Hm, it seems your etherswitchcfg code is reusing code from ifconfig? >> Or is that code from ray? >>=20 >> Just a nitpick, we should likely avoid that code duplication and >> either roll this into ifconfig, or should we just break out the >> ifconfig related code into a shared library and reuse that? >=20 > Ultimately, that would be the correct way. I'd start working on that = once it's clear that this is the way forward. >=20 > Integrating the switch configuration code into ifconfig has crossed my = mind, but I think the overlap is too small to make sense. While the = media code manipulates the same data structures (struct ifreq, struct = ifmediareq), the ioctls are completely different, so much of the = ifconfig infrastructure is actually in the way. >=20 > I'm using sbin/ifconfig/if_media.c unchanged except for exporting some = of the low level functions for printing and parsing media and mediaopt. = I'm not certain where this code would go to be shared efficiently. = Also, wherever it goes ifconfig still needs to be buildable for /rescue. Unless the code is huge, I'd like to see it in ifconfig as well from a = usability standpoint. Why require yet another application to do this? = We put all the wireless stuff into ifconfig. If the infrastructure really is getting in the way, I'd like to look at = ways to make ifconfig more flexible and less in the way. Warner From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 16:15:58 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 F2654106564A for ; Tue, 13 Dec 2011 16:15:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3D58FC0A for ; Tue, 13 Dec 2011 16:15:58 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so8118192vcb.13 for ; Tue, 13 Dec 2011 08:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=cj3wzoCaTO1RlX2do+9/uExSdZyO7UqhoMngZ0sP1O0=; b=KGXWuL4mHzgjYBIW5L/yjohdfawGyiNs5QliQBGsN4YNr2u23M2aRDA/7bewKQgMIX 7czRCmf1Wv0el1yI6pWmex9Plq1estSSiDyGFz6oZjHxEsyeAkvWSxnrUyYQdeHiZHp7 RxqtEdUoRb6C4TnK3dX1//uHU1VG/VDWfgR+k= MIME-Version: 1.0 Received: by 10.220.230.67 with SMTP id jl3mr1995128vcb.60.1323792957891; Tue, 13 Dec 2011 08:15:57 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Tue, 13 Dec 2011 08:15:57 -0800 (PST) In-Reply-To: <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> Date: Tue, 13 Dec 2011 08:15:57 -0800 X-Google-Sender-Auth: z7Z3Mglh5Wzn5LQOl0kznbuXQWU Message-ID: From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 16:15:59 -0000 On 13 December 2011 07:41, Warner Losh wrote: > Unless the code is huge, I'd like to see it in ifconfig as well from a us= ability standpoint. =A0Why require yet another application to do this? =A0W= e put all the wireless stuff into ifconfig. > > If the infrastructure really is getting in the way, I'd like to look at w= ays to make ifconfig more flexible and less in the way. It doesn't _look_ that bad. Bah, I think I'm going to be spending this weekend knee deep in the GPIO code changes needed and Stefan's/Ray's switch API code. *stab*. Thanks guys. :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 17:19:05 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 8E4A41065675; Tue, 13 Dec 2011 17:19:05 +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 499E68FC1B; Tue, 13 Dec 2011 17:19:05 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 2D0FD5EF34; Tue, 13 Dec 2011 18:19:04 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> Date: Tue, 13 Dec 2011 18:19:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <725DC34F-2A68-43E2-BE05-3AC76D07F8B5@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1251.1) Cc: Adrian Chadd , freebsd-embedded@FreeBSD.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 17:19:05 -0000 Am 13.12.2011 um 16:41 schrieb Warner Losh: >> I'm using sbin/ifconfig/if_media.c unchanged except for exporting = some of the low level functions for printing and parsing media and = mediaopt. I'm not certain where this code would go to be shared = efficiently. Also, wherever it goes ifconfig still needs to be = buildable for /rescue. >=20 > Unless the code is huge, I'd like to see it in ifconfig as well from a = usability standpoint. Why require yet another application to do this? = We put all the wireless stuff into ifconfig. >=20 > If the infrastructure really is getting in the way, I'd like to look = at ways to make ifconfig more flexible and less in the way. I'm fine with rolling all this into ifconfig, but please note that the = switch configuration has very little to do with the systems ethernet = interfaces. It just so happens that usually one of the systems ethernet = interfaces is also connected to the switch. The PHYs connected to the = switch are completely separate from any interface ifconfig manages*. I = just wanted to simplify my own work by trying to use the existing miibus = code. The commands and the output from my prototype configuration utility are = intentionally similar to ifconfig, but the ioctls go through a separate = cdev, not through the socket ioctl. I believe it would be = counterintuitive to try and fit the switch configuration through the = interface configuration interface, as there is very little overlap = beyond the PHY stuff. If we want to integrate the switch configuration into ifconfig, the = first question from a usability perspective would be how to identify the = switch and it's various configurable entities (ports, vlans, queues, = etc.), since that namespace would be distinct from the ifnet namespace. Stefan * On some switch chip models, one of the built-in PHYs is exposed = through a separate MII, and can be used as any discrete PHY would be = used. But that has little to do with the switch itself. --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Dec 13 18:37:37 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 1389E106566B; Tue, 13 Dec 2011 18:37:37 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 8BEF08FC12; Tue, 13 Dec 2011 18:37:36 +0000 (UTC) Received: from rnote.ddteam.net (227-240-133-95.pool.ukrtel.net [95.133.240.227]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 7A61BC4935; Tue, 13 Dec 2011 20:20:18 +0200 (EET) Date: Tue, 13 Dec 2011 20:20:16 +0200 From: Aleksandr Rybalko To: Warner Losh Message-Id: <20111213202017.4c44f610.ray@freebsd.org> In-Reply-To: <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <55D569DB-875B-412B-8650-C56F85D8E327@lassitu.de> <96F0A4F9-671B-422C-B8F2-6F386B1B3672@bsdimp.com> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , freebsd-embedded@FreeBSD.org Subject: Re: TL-WR1043: switch 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: Tue, 13 Dec 2011 18:37:37 -0000 Hi embeddeders :) On Tue, 13 Dec 2011 08:41:01 -0700 Warner Losh wrote: > > On Dec 13, 2011, at 1:00 AM, Stefan Bethke wrote: > > > > > Am 13.12.2011 um 02:41 schrieb Adrian Chadd: > > > >> Hm, it seems your etherswitchcfg code is reusing code from > >> ifconfig? Or is that code from ray? > >> > >> Just a nitpick, we should likely avoid that code duplication and > >> either roll this into ifconfig, or should we just break out the > >> ifconfig related code into a shared library and reuse that? > > > > Ultimately, that would be the correct way. I'd start working on > > that once it's clear that this is the way forward. > > > > Integrating the switch configuration code into ifconfig has crossed > > my mind, but I think the overlap is too small to make sense. While > > the media code manipulates the same data structures (struct ifreq, > > struct ifmediareq), the ioctls are completely different, so much of > > the ifconfig infrastructure is actually in the way. > > > > I'm using sbin/ifconfig/if_media.c unchanged except for exporting > > some of the low level functions for printing and parsing media and > > mediaopt. I'm not certain where this code would go to be shared > > efficiently. Also, wherever it goes ifconfig still needs to be > > buildable for /rescue. > > Unless the code is huge, I'd like to see it in ifconfig as well from > a usability standpoint. Why require yet another application to do > this? We put all the wireless stuff into ifconfig. > > If the infrastructure really is getting in the way, I'd like to look > at ways to make ifconfig more flexible and less in the way. > > Warner > No-no-no, please! We can't embed whole big switch network (of ISP for example), but we able to control any of "smart enough" switches. And switch is optional item, and in many cases we don't need even touch it. And ifconfig already tooooo big for embedded, so if want to take the limit 2M of flash size (many AP use that and no switch control required here), we must not to do that. ifconfig is very cool tool, but it is not a rubber :) IMO, Ethernet switch is a separate system, so must be configured with separate tool. Otherwise we need to made hddconfig and embed into it (ata|cam|cd|mfi|mpt)(control|util) :) Hope we will find right way :) -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 01:07:39 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 D7364106566B for ; Thu, 15 Dec 2011 01:07:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 90F698FC15 for ; Thu, 15 Dec 2011 01:07:39 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1804154vbb.13 for ; Wed, 14 Dec 2011 17:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=r9MgyYXUeinezxTYkug7eLJGRduUW6rWgtoW4ixEbE8=; b=nxLFl8ZLeM5pLepBakwO5K5S38165axBgBXpU58CYqIK7K3SA1OKkHLBjhs9+6h4Fq /3iDOsFZ7mmuFSyu8isS/bhjkNu4PtEJCHrlAD3BJ2WUw3HsZz19Gulf/7DfriNslku1 Lsy9tOm3grfXhBvYO1CUiwr4R6i+lVbVSR/Vw= MIME-Version: 1.0 Received: by 10.52.175.9 with SMTP id bw9mr851157vdc.130.1323911258688; Wed, 14 Dec 2011 17:07:38 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Wed, 14 Dec 2011 17:07:38 -0800 (PST) Date: Wed, 14 Dec 2011 17:07:38 -0800 X-Google-Sender-Auth: Py31d01dQv1CKM_IFsEUd0hpEq0 Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: GPIO code updated in -HEAD 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: Thu, 15 Dec 2011 01:07:39 -0000 Hi, I've just updated the atheros GPIO code to allow for GPIO pin definitions. Please check out what I've done in AR91XX_BASE.hints and TP-WN1043ND.hints. Stefan, would you mind verifying this is enough to bring up the switch device on your tplink unit, using just your switch device/api patches? Thanks, Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 07:59: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 B04FB1065676; Thu, 15 Dec 2011 07:59: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 795EE8FC0A; Thu, 15 Dec 2011 07:59:16 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id F0FB05CC5B; Thu, 15 Dec 2011 08:59:14 +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: Thu, 15 Dec 2011 08:59:14 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: GPIO code updated in -HEAD 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: Thu, 15 Dec 2011 07:59:16 -0000 Am 15.12.2011 um 02:07 schrieb Adrian Chadd: > Hi, > > I've just updated the atheros GPIO code to allow for GPIO pin > definitions. Please check out what I've done in AR91XX_BASE.hints and > TP-WN1043ND.hints. > > Stefan, would you mind verifying this is enough to bring up the switch > device on your tplink unit, using just your switch device/api patches? Looks good! Thanks, Stefan -- Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 22:25:20 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 4C1681065673 for ; Thu, 15 Dec 2011 22:25:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 08B978FC16 for ; Thu, 15 Dec 2011 22:25:18 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3323141vcb.13 for ; Thu, 15 Dec 2011 14:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=6GFtKFfpa5gJC0w2IFd5o1n40M4JBE4EX+KOzfRYZGA=; b=jndtnnFL7GKOk2M5PCowOjCZLQl9nqzKDuLZTbYuf7KZD99QuvV7OAdw3lq+HDw+qP o6qc865py+Mqd47z1FQ7BleJoBWkLGO5m0F32l25iyRgQiLjMeda6fB3TmwZax4E0B6D iWMTpoRmwXC9Aoytkx6tYaPYbO8rwV5e12090= MIME-Version: 1.0 Received: by 10.220.151.204 with SMTP id d12mr1677509vcw.40.1323987918428; Thu, 15 Dec 2011 14:25:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 14:25:18 -0800 (PST) In-Reply-To: References: Date: Thu, 15 Dec 2011 14:25:18 -0800 X-Google-Sender-Auth: BqI5fy-Jt-KlEmUXtwjaPGNFPGs Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: GPIO code updated in -HEAD 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: Thu, 15 Dec 2011 22:25:20 -0000 On 14 December 2011 23:59, Stefan Bethke wrote: >> Stefan, would you mind verifying this is enough to bring up the switch >> device on your tplink unit, using just your switch device/api patches? > > Looks good! Cool, I'll try it out now and give you some feedback. Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 22:44:01 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 6EEE3106566B for ; Thu, 15 Dec 2011 22:44:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2CA088FC0C for ; Thu, 15 Dec 2011 22:44:00 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3343503vcb.13 for ; Thu, 15 Dec 2011 14:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=KA9CFvKkGt4DGiuRvnG80Ni6sZfQLoV3mchDTGoz7ng=; b=ScXEUgbX/wBNbjmnFuGPv809RB1lefLp7odMSlx+AJBdEQSGmJM+R8gyfEk84yQKXS D7B3dMuIYXGKTjEdSKv0b8DQI+uZrj2Kp9zBdH0oZwcMnO+vDcxl/GG3gRkyzR3GndTk ISi6y7Ral0fnnmurJgalV3bbhp1N13GTgDqQM= MIME-Version: 1.0 Received: by 10.52.67.111 with SMTP id m15mr4595564vdt.96.1323989040513; Thu, 15 Dec 2011 14:44:00 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 14:44:00 -0800 (PST) Date: Thu, 15 Dec 2011 14:44:00 -0800 X-Google-Sender-Auth: 3UuaaNLk065w-N3Ed8ZKgXFObAg Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: 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: Thu, 15 Dec 2011 22:44:01 -0000 Hi Stefan, Would you mind posting an updated patch against latest -HEAD? I'd like to ensure all the stuff is in your patch. The only patchI have here doesn't include the conf/hints patch to enable the switch and glue it in. :) Thanks, Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 23:04:54 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 3193A106566B; Thu, 15 Dec 2011 23:04:54 +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 EE59F8FC0C; Thu, 15 Dec 2011 23:04:53 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id EC4828B386; Fri, 16 Dec 2011 00:04:52 +0100 (CET) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Message-Id: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> X-Mailer: iPad Mail (9A405) From: Stefan Bethke Date: Fri, 16 Dec 2011 00:04:52 +0100 To: Adrian Chadd 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: Thu, 15 Dec 2011 23:04:54 -0000 Will do tomorrow morning. -- Stefan Bethke Fon +49 151 14070811 Am 15.12.2011 um 23:44 schrieb Adrian Chadd : > Hi Stefan, > > Would you mind posting an updated patch against latest -HEAD? > I'd like to ensure all the stuff is in your patch. The only patchI > have here doesn't include the conf/hints patch to enable the switch > and glue it in. :) > > Thanks, > > > Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 23:20:36 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 BE35E106566B for ; Thu, 15 Dec 2011 23:20:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 74FC68FC0C for ; Thu, 15 Dec 2011 23:20:36 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3292405vbb.13 for ; Thu, 15 Dec 2011 15:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=o9m+tbQ52X7aVfiSu1YokzXPbaoZ4q3hk4U1J+b1a7g=; b=G66YY7oPCqxx9TyhY1frwu4d80MNocAmeinpI1HcVltfylSAkXzMgR9FlM2doLDGNv R1Zonxu/lyeodUEqXJevEkylsubYkeq+viInZyDAJZg9UtbAewImffOwbcZjXVn4RDbm 3uKFnzxn1nAYh5mtMXFuo8vAda0PdbNyj/ges= MIME-Version: 1.0 Received: by 10.52.67.111 with SMTP id m15mr4647857vdt.96.1323991235659; Thu, 15 Dec 2011 15:20:35 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 15:20:35 -0800 (PST) In-Reply-To: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> Date: Thu, 15 Dec 2011 15:20:35 -0800 X-Google-Sender-Auth: OCUD_JOqKWXK4ANeOoUWR4bkl5o Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-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: Thu, 15 Dec 2011 23:20:36 -0000 On 15 December 2011 15:04, Stefan Bethke wrote: > Will do tomorrow morning. I can't seem to build this under -HEAD. The embedded ifreq structs in etherswitch.h are causing an issue when compiling etherswitch_if.c (from etherswitch_if.m.) net/if.h isn't included, and if I include that, all kinds of other crap spews out. I can't find any other examples of the ifreq / ifmediareq structs being embedded inside the object state. Why'd you do that? :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 23:49:41 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 09F55106566B; Thu, 15 Dec 2011 23:49:41 +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 C4C4C8FC0C; Thu, 15 Dec 2011 23:49:40 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 287318B4C9; Fri, 16 Dec 2011 00:49:40 +0100 (CET) References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> X-Mailer: iPad Mail (9A405) From: Stefan Bethke Date: Fri, 16 Dec 2011 00:49:39 +0100 To: Adrian Chadd 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: Thu, 15 Dec 2011 23:49:41 -0000 So I could call the generic if media ioctl. I'll update the patch at around= 8 UTC.=20 --=20 Stefan Bethke Fon +49 151 14070811 Am 16.12.2011 um 00:20 schrieb Adrian Chadd : > On 15 December 2011 15:04, Stefan Bethke wrote: >> Will do tomorrow morning. >=20 > I can't seem to build this under -HEAD. The embedded ifreq structs in > etherswitch.h are causing an issue when compiling etherswitch_if.c > (from etherswitch_if.m.) net/if.h isn't included, and if I include > that, all kinds of other crap spews out. >=20 > I can't find any other examples of the ifreq / ifmediareq structs > being embedded inside the object state. Why'd you do that? :) >=20 >=20 > Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 23:52:34 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 CBF551065672 for ; Thu, 15 Dec 2011 23:52:34 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7BCC88FC15 for ; Thu, 15 Dec 2011 23:52:34 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3406619vcb.13 for ; Thu, 15 Dec 2011 15:52:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=sXEj2XzBbEj8GnEQoZdOFUI6dYN6OZKtTM7N5sl8tLM=; b=O9MS6Iw3SD457vOSRiuaJOi4IfJJWgSSvXcbx1KNEY+qEicGcXsfYwsRH0pPd9Xjya /wqM3fPbIagfpBO6Z99dtEyzm9K7ibs11ovM+NdbdJvIgAOVS6YlllL5FnPC/5HKhQbB nKwXZHoMou/alGurkZM7zPy1nWFNigB4+jFIo= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr4650584vdb.113.1323993153911; Thu, 15 Dec 2011 15:52:33 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 15:52:33 -0800 (PST) In-Reply-To: <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> Date: Thu, 15 Dec 2011 15:52:33 -0800 X-Google-Sender-Auth: TGFZvrkmVxeBAUxZZ15dOWOHuwk Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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: Thu, 15 Dec 2011 23:52:34 -0000 On 12 December 2011 15:48, Stefan Bethke wrote: > http://www.lassitu.de/freebsd/etherswitch-rtl8366rb.patch Hi, What's the kernel configuration and hints that you're using? I'm trying to build it as part of the kernel and this happens. I wonder if it's due to the probe order. gpio0: on apb0 gpio0: [GIANT-LOCKED] gpio0: function_set: 0x0 gpio0: function_clear: 0x0 gpio0: gpio pinmask=0x1c02ae gpioc0: on gpio0 gpiobus0: on gpio0 gpioled0: at pin(s) 1 on gpiobus0 gpioled1: at pin(s) 2 on gpiobus0 gpioled2: at pin(s) 5 on gpiobus0 gpioled3: at pin(s) 9 on gpiobus0 gpioiic0: at pin(s) 18-19 on gpiobus0 iicbb0: on gpioiic0 iicbus0: on iicbb0 master-only rtl8366rb0: at addr 0xa8 on iicbus0 rtl8366rb0: rev. 3 device_attach: rtl8366rb0 attach returned 6 iic0: on iicbus0 ehci0: at mem 0x1b000100-0x1bffffff irq 1 on nexus0 usbus0: set host controller mode usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0: on ehci0 arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: Overriding MAC from EEPROM arge0: Ethernet address: 94:0c:6d:fe:4f:20 arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0 device_attach: arge1 attach returned 22 From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 15 23:57:34 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 9C745106564A for ; Thu, 15 Dec 2011 23:57:34 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 533478FC17 for ; Thu, 15 Dec 2011 23:57:34 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3324838vbb.13 for ; Thu, 15 Dec 2011 15:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Lus5r/lpZU5bZqyFK+FnbqV3xfHmKxUAKibfSq/b0/4=; b=AvqTbYJRqHC5aaYJmc7ql0MdjOkaP9hNbWwYfWvmpr6VbU1wMtaZJGtS1K0xgihM91 vhkYTdCyqChdj5At++nPbeA+10s25kE5JtJm1TTZ+3p21kI9YZ3STIru+foiuDQmom71 n56Xji90eYg1Z0ZUpC+KwvCzfSGP+YkFxdh84= MIME-Version: 1.0 Received: by 10.52.175.9 with SMTP id bw9mr4636947vdc.130.1323993453879; Thu, 15 Dec 2011 15:57:33 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 15:57:33 -0800 (PST) In-Reply-To: <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> Date: Thu, 15 Dec 2011 15:57:33 -0800 X-Google-Sender-Auth: kQR4Nvyloifn1Z97yvpINxPG6oU Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Thu, 15 Dec 2011 23:57:34 -0000 On 15 December 2011 15:49, Stefan Bethke wrote: > So I could call the generic if media ioctl. =A0I'll update the patch at a= round 8 UTC. I've hacked around that for now in my local test; now I'm just trying to get it to attach when built as part of an existing kernel, rather than loaded as a module. See my message in another thread. Thanks, Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 00:54:06 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 C1B6E106564A for ; Fri, 16 Dec 2011 00:54:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6B18FC0A for ; Fri, 16 Dec 2011 00:54:06 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3458191vcb.13 for ; Thu, 15 Dec 2011 16:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LetGBeza8I37piSPk/sLOpqJ2hRQLe55g/4TkxD9UJw=; b=ConBg41IshGdoOpwso5bnEV6d7kg8zfkRKaVlEuXWV4wRXYeA5xVsFlAAFUPvm9rwT sXlwVesS9NQhOIcoM/LTaAhwH7idDXPMgT13C1W2BWW9j5gFUE6QYXtwsUnBgqDU/Dqm jWvwQhHePe2aYwHeaxJ40gVskb51m+CN49Zs4= MIME-Version: 1.0 Received: by 10.220.230.67 with SMTP id jl3mr1885454vcb.60.1323996845708; Thu, 15 Dec 2011 16:54:05 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 16:54:05 -0800 (PST) In-Reply-To: References: <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> Date: Thu, 15 Dec 2011 16:54:05 -0800 X-Google-Sender-Auth: L0rTLK_yYdkMPeWzfqZZWauAprk Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-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 00:54:06 -0000 I have it compiling and working in the kernel. I haven't tested it as a module. 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. :) Adrian Now, LORs. lock order reversal: 1st 0x80739d00 rtl8366rb0 (network driver) @ /home/adrian/work/freebsd/git/adrianchadd-freebsd-work/adrianchadd-freebsd-work/sys/kern/kern_mutex.c:148 2nd 0x80765940 gpio0 (gpiobus) @ /home/adrian/work/freebsd/git/adrianchadd-freebsd-work/adrianchadd-freebsd-work/sys/dev/gpio/gpiobus.c:330 KDB: stack backtrace: db_trace_thread+30 (?,?,?,?) ra 8035dfb8 sp c03e1950 sz 24 db_trace_self+1c (?,?,?,?) ra 800767ac sp c03e1968 sz 24 80076778+34 (?,?,?,?) ra 801ae05c sp c03e1980 sz 416 kdb_backtrace+44 (?,?,?,?) ra 801c5c90 sp c03e1b20 sz 24 801c5c5c+34 (?,?,?,?) ra 801c694c sp c03e1b38 sz 32 witness_checkorder+9cc (?,?,803a1148,14a) ra 80165648 sp c03e1b58 sz 80 _mtx_lock_flags+d4 (?,?,?,?) ra 800c00b0 sp c03e1ba8 sz 48 800c006c+44 (?,?,?,?) ra 800c1094 sp c03e1bd8 sz 24 800c102c+68 (?,?,?,?) ra 800c27a8 sp c03e1bf0 sz 40 800c272c+7c (?,?,?,?) ra 800c3500 sp c03e1c18 sz 48 800c34b4+4c (?,?,?,?) ra 800c3f60 sp c03e1c48 sz 40 iicbus_start+8c (?,?,?,?) ra 80348160 sp c03e1c70 sz 40 803480e4+7c (?,?,?,?) ra 80348274 sp c03e1c98 sz 56 80348244+30 (?,?,?,?) ra 800c8924 sp c03e1cd0 sz 40 800c88b8+6c (?,?,?,?) ra 800caca8 sp c03e1cf8 sz 32 mii_phy_tick+9c (?,?,?,?) ra 800cae4c sp c03e1d18 sz 40 800cadf4+58 (?,?,?,?) ra 800c862c sp c03e1d40 sz 32 mii_tick+4c (?,?,?,?) ra 80348664 sp c03e1d60 sz 32 80348628+3c (?,?,?,?) ra 8018c5dc sp c03e1d80 sz 40 softclock+298 (?,?,?,?) ra 8014c230 sp c03e1da8 sz 88 intr_event_execute_handlers+158 (?,?,?,?) ra 8014d238 sp c03e1e00 sz 40 8014d12c+10c (?,?,?,?) ra 801494ec sp c03e1e28 sz 48 fork_exit+a8 (?,?,?,?) ra 803566f0 sp c03e1e58 sz 40 fork_trampoline+10 (?,?,?,?) ra 0 sp c03e1e80 sz 0 pid 11 and Trying to mount root from ufs:map/rootfs.uzip []... warning: no time-of-day clock registered, system time will not be set accuratelylock order reversal: 1st 0x80739d00 rtl8366rb0 (network driver) @ /home/adrian/work/freebsd/git/adrianchadd-freebsd-work/adrianchadd-freebsd-work/sys/kern/kern_mutex.c:148 2nd 0x807116ac iicbus (iicbus) @ /home/adrian/work/freebsd/git/adrianchadd-freebsd-work/adrianchadd-freebsd-work/sys/dev/iicbus/iiconf.c:94 KDB: stack backtrace: db_trace_thread+30 (?,?,?,?) ra 8035dfb8 sp c03e19d8 sz 24 db_trace_self+1c (?,?,?,?) ra 800767ac sp c03e19f0 sz 24 80076778+34 (?,?,?,?) ra 801ae05c sp c03e1a08 sz 416 kdb_backtrace+44 (?,?,?,?) ra 801c5c90 sp c03e1ba8 sz 24 801c5c5c+34 (?,?,?,?) ra 801c694c sp c03e1bc0 sz 32 witness_checkorder+9cc (?,?,803a1634,5e) ra 80165648 sp c03e1be0 sz 80 _mtx_lock_flags+d4 (?,?,?,?) ra 800c43e4 sp c03e1c30 sz 48 iicbus_request_bus+58 (?,?,1,?) ra 80348148 sp c03e1c60 sz 56 803480e4+64 (?,?,?,?) ra 80348274 sp c03e1c98 sz 56 80348244+30 (?,?,?,?) ra 800c8924 sp c03e1cd0 sz 40 800c88b8+6c (?,?,?,?) ra 800caca8 sp c03e1cf8 sz 32 mii_phy_tick+9c (?,?,?,?) ra 800cae4c sp c03e1d18 sz 40 800cadf4+58 (?,?,?,?) ra 800c862c sp c03e1d40 sz 32 mii_tick+4c (?,?,?,?) ra 80348664 sp c03e1d60 sz 32 80348628+3c (?,?,?,?) ra 8018c5dc sp c03e1d80 sz 40 softclock+298 (?,?,?,?) ra 8014c230 sp c03e1da8 sz 88 intr_event_execute_handlers+158 (?,?,?,?) ra 8014d238 sp c03e1e00 sz 40 8014d12c+10c (?,?,?,?) ra 801494ec sp c03e1e28 sz 48 fork_exit+a8 (?,?,?,?) ra 803566f0 sp c03e1e58 sz 40 fork_trampoline+10 (?,?,?,?) ra 0 sp c03e1e80 sz 0 pid 11 Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 01:29:58 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 099B3106564A for ; Fri, 16 Dec 2011 01:29:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id ADCF08FC15 for ; Fri, 16 Dec 2011 01:29:57 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3489427vcb.13 for ; Thu, 15 Dec 2011 17:29:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=WGsGTeqcwWNQyLTyUbykJXufiUXM4+IiIaVWVFP+Sl8=; b=ZmEu3eC6p7+y6lb1O3khUTJYd4iDVEDpGWj0G7JkoNeeHKR9pky80pKKTuZh0YJPjk TqFM74oYmXWQcm9STXn2clClwgBb+xDQGCcGlULW1ZzP5+Hb0nSwk+M4x/s/0evkDqcZ rwx8FCUbJMgA6KFaaqNzZlWDbBy5sEjPzqKyY= MIME-Version: 1.0 Received: by 10.52.175.9 with SMTP id bw9mr4736317vdc.130.1323998997112; Thu, 15 Dec 2011 17:29:57 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Thu, 15 Dec 2011 17:29:57 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> Date: Thu, 15 Dec 2011 17:29:57 -0800 X-Google-Sender-Auth: EnHcw77zExWBveYEUsoUuHIo824 Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 01:29:58 -0000 Hi! So I have it working; I've not tried vlans yet (I'm still building an updated world complete with your config tool) so I'll report when I've tested that, but so far so good. Both ports work, the default vlan tag works, port status seems to work. Thanks very much for this! So next is looking at ray@'s work in zrouter on the ar8216/ar8316 switch PHYs. There's going to be some rather (un) fun stuff, including figuring out what to do about gluing in ukphy/switchphy entries as needed, shared MII bus, etc. Question: the tplink 1043nd arge0 hints currently has a phymask of 0x000c, with a nailed up media/duplex. This avoids attaching a ukphy to the device. How should that now be handled? Instead of this phymask thing, add a flag which says "don't use a phy, we're attaching another way" so that code path doesn't run, but it doesn't try probing a PHY? Or? Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 07:56:21 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 EDC1A106564A; Fri, 16 Dec 2011 07:56:21 +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 A93538FC13; Fri, 16 Dec 2011 07:56:21 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id D9B2A90615; Fri, 16 Dec 2011 08:56:19 +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 08:56:19 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 07:56:22 -0000 Am 16.12.2011 um 02:29 schrieb Adrian Chadd: > Hi! >=20 > So I have it working; I've not tried vlans yet (I'm still building an > updated world complete with your config tool) so I'll report when I've > tested that, but so far so good. Both ports work, the default vlan tag > works, port status seems to work. For those trying to play along at home: I've updated the patch so it = actually compiles correctly, both as modules as well as compiled into = the kernel. > Thanks very much for this! You're welcome! > So next is looking at ray@'s work in zrouter on the ar8216/ar8316 > switch PHYs. There's going to be some rather (un) fun stuff, including > figuring out what to do about gluing in ukphy/switchphy entries as > needed, shared MII bus, etc. Yup. > Question: the tplink 1043nd arge0 hints currently has a phymask of > 0x000c, with a nailed up media/duplex. This avoids attaching a ukphy > to the device. How should that now be handled? Instead of this phymask > thing, add a flag which says "don't use a phy, we're attaching another > way" so that code path doesn't run, but it doesn't try probing a PHY? > Or? For the TL-WR1043ND, no PHY should be attached to arge0, and the speed = etc. should be hardwired to 1000/fdx, since that's what the switch MAC = arge0 is connected to is wired to. We could add code to change arge0 and the switch configuration, but I = see little benefit in that. Stefan --=20 Stefan Bethke Fon +49 151 14070811 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 From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 15:14:54 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 82CBF1065670 for ; Fri, 16 Dec 2011 15:14:54 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 35DB68FC17 for ; Fri, 16 Dec 2011 15:14:54 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so4273656vbb.13 for ; Fri, 16 Dec 2011 07:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=qhXfBiCKqyanHz5ay6GGC4c0vcggEpyRyfJT3/Y3CMc=; b=l0jhGHaYdIIDQ8hJIdcl1HhWv+bqUlDyF5hmlAZTm9EwXZAOfz4uTg1UfkXGA8KfUh /aysNnNkzTCr/zXT2Wfa7cDZp7OEwkWBzCN8kuzhjDw149Wsfq2HUR+YMeCC3vZP/nxB USEHTZTVkLaM1Fgy4OmJuM7JR6lN+48OkBsRI= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr6005168vdb.113.1324048493640; Fri, 16 Dec 2011 07:14:53 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Fri, 16 Dec 2011 07:14:49 -0800 (PST) In-Reply-To: <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> Date: Fri, 16 Dec 2011 07:14:49 -0800 X-Google-Sender-Auth: QzGiBLNR7PZ3nnUqM5TGdZLfCi4 Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 15:14:54 -0000 I've thrown your stuff into my git tree. https://gitorious.org/~adrianchadd/freebsd/adrianchadd-freebsd-work This is what I'm going to eventually commit to FreeBSD-HEAD. I still need to pull in ar8216/ar8316 support from zrouter, along with whatever switch infrastructure modifications we need. I know this a bit to ask, but would you be willing to send me some patches based on what's in that tree? That way I can just commit them as needed. Thanks! Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 15:17:47 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 70568106564A; Fri, 16 Dec 2011 15:17:47 +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 29D068FC16; Fri, 16 Dec 2011 15:17:47 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id D77AB105512; Fri, 16 Dec 2011 16:17:45 +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 16:17:45 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 15:17:47 -0000 Am 16.12.2011 um 16:14 schrieb Adrian Chadd: > I've thrown your stuff into my git tree. >=20 > https://gitorious.org/~adrianchadd/freebsd/adrianchadd-freebsd-work >=20 > This is what I'm going to eventually commit to FreeBSD-HEAD. I still > need to pull in ar8216/ar8316 support from zrouter, along with > whatever switch infrastructure modifications we need. >=20 > I know this a bit to ask, but would you be willing to send me some > patches based on what's in that tree? That way I can just commit them > as needed. >=20 I'll try to do that. How quickly do you want to do this? I feel this is all pretty much a = work in progress, and I'd like to refine it quite a bit more over the = next couple of weeks. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 15:36:28 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 3F164106566B for ; Fri, 16 Dec 2011 15:36:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id E05CE8FC13 for ; Fri, 16 Dec 2011 15:36:27 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4358893vcb.13 for ; Fri, 16 Dec 2011 07:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=N2NpweKDXfLH0JJmiHen7+y5aGXzIlyTt9rQ6hMUIRw=; b=KmZv2yb57W7EWP9GdBXkjMkZYkwSwwFDODc44gZHfKR6hYxPyri0ylZIBUkOh0k3Ld /UrfAyTyW34Iq+zP+dZwMASbJlIOBQFCX5BedDGDZgtQznT3NMjpaOPLtfskGWwjfFZb duz93ZTRwK3A/R22/0jCiXFFXKQ95Qjk3xgA4= MIME-Version: 1.0 Received: by 10.52.90.80 with SMTP id bu16mr6107950vdb.113.1324049787206; Fri, 16 Dec 2011 07:36:27 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.26.50 with HTTP; Fri, 16 Dec 2011 07:36:27 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> Date: Fri, 16 Dec 2011 07:36:27 -0800 X-Google-Sender-Auth: BZh3IUrnPX7wkpJ7f_yCGgxzkQs Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 15:36:28 -0000 On 16 December 2011 07:17, Stefan Bethke wrote: >> I know this a bit to ask, but would you be willing to send me some >> patches based on what's in that tree? That way I can just commit them >> as needed. >> > > I'll try to do that. > > How quickly do you want to do this? =A0I feel this is all pretty much a w= ork in progress, and I'd like to refine it quite a bit more over the next c= ouple of weeks. Just keep throwing patches at me. I'm not in _that_ much of a rush. I'd like to try and get some of the zrouter switch code merged in and get this working on the routerstation/routerstation pro. I'm sure this will churn a bit over the next couple of weeks. It's in the "work/ath" branch in my git repository. Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 16 15:47:19 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 A93FA106564A; Fri, 16 Dec 2011 15:47:19 +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 614778FC1D; Fri, 16 Dec 2011 15:47:19 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 9A39510561F; Fri, 16 Dec 2011 16:47:18 +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 16:47:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <041D06AA-261C-48B0-9337-D0BDA7F1101D@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de> <710E2C7A-E9AC-4103-8C61-0EDC4A3AF9DE@lassitu.de> <24FB4633-B729-4582-9FF6-CA8656742985@lassitu.de> <1BED9DE4-3DB7-4523-AB7D-39A7960A4BA9@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch 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 15:47:19 -0000 Am 16.12.2011 um 16:36 schrieb Adrian Chadd: > On 16 December 2011 07:17, Stefan Bethke wrote: >=20 >>> I know this a bit to ask, but would you be willing to send me some >>> patches based on what's in that tree? That way I can just commit = them >>> as needed. >>>=20 >>=20 >> I'll try to do that. >>=20 >> How quickly do you want to do this? I feel this is all pretty much a = work in progress, and I'd like to refine it quite a bit more over the = next couple of weeks. >=20 > Just keep throwing patches at me. I'm not in _that_ much of a rush. > I'd like to try and get some of the zrouter switch code merged in and > get this working on the routerstation/routerstation pro. I'm sure this > will churn a bit over the next couple of weeks. >=20 > It's in the "work/ath" branch in my git repository. Gotcha. I've tried to write down everything that has crossed my mind in a = semi-organized way on the wiki: = http://wiki.freebsd.org/StefanBethke/EtherSwitch I'm sure there's more, and currently its more questions than answers, = but hopefully it'll allow people to understand the code a bit better. Stefan --=20 Stefan Bethke Fon +49 151 14070811