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"