Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Dec 2011 01:06:58 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        freebsd-embedded@freebsd.org
Subject:   Re: TL-WR1043: switch
Message-ID:  <74E4AF57-3D22-415E-B913-176753B09B16@lassitu.de>
In-Reply-To: <EA0807C1-6FEE-4743-8DCA-1AC873664005@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> <CAJ-VmomWsGy9wMb0zA-WjTRP6Qh%2BO2u_Pe-rgkerFFpi04iKnw@mail.gmail.com> <6387ABA5-AC55-49DD-9058-E45CC0A3E0A0@lassitu.de> <CAJ-VmonM91s-kbbEqVDy9PvtH-gxLWYmusGiqzqCWMtfMdoo2A@mail.gmail.com> <EA0807C1-6FEE-4743-8DCA-1AC873664005@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <RTL8366RB Ethernet Switch Controller> at addr 0xa8 on =
iicbus0
rtl8366rb0: rev. 3
miibus0: <MII bus> on rtl8366rb0
ukphy0: <Generic IEEE 802.3u media interface> 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: <Generic IEEE 802.3u media interface> 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: <Generic IEEE 802.3u media interface> 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: <Generic IEEE 802.3u media interface> 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: <Generic IEEE 802.3u media interface> 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: <Switch controller> 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 <stb@lassitu.de>   Fon +49 151 14070811






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?74E4AF57-3D22-415E-B913-176753B09B16>