Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2011 09:03:14 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>
Subject:   Re: Updated switch/glue patch?
Message-ID:  <C637C171-A1A2-4296-84FA-6DE97137DC42@lassitu.de>
In-Reply-To: <CAJ-Vmo=WSN1oLM=B2HqSHrWyOaOD9BSwwu8=1Wys0CLRJ_N-TA@mail.gmail.com>
References:  <CAJ-Vmon8%2BOXQ4g752zZEB-O0BR0sFWO0QUvw--xp2jsBDkx6tQ@mail.gmail.com> <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <CAJ-Vmo=Y8pp4iFnw%2B1hcPae6QXFboz=a7puwgC1kVSZ3JwMgPQ@mail.gmail.com> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> <CAJ-VmonrnJ7cC6u2LsL9AGusz_%2BkSwY62Rr1__sg5U_NynJ1SQ@mail.gmail.com> <CAJ-Vmo=WSN1oLM=B2HqSHrWyOaOD9BSwwu8=1Wys0CLRJ_N-TA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <stb@lassitu.de>   Fon +49 151 14070811






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C637C171-A1A2-4296-84FA-6DE97137DC42>