Updated switch/glue patch?

Stefan Bethke stb at lassitu.de
Fri Dec 16 08:03:16 UTC 2011


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.
> 
> 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. :)
> 
> 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

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 151 14070811





More information about the freebsd-embedded mailing list