Ethernet switch framework
Aleksandr Rybalko
ray at dlink.ua
Thu Dec 8 12:52:40 UTC 2011
On Mon, 5 Dec 2011 00:16:45 +0100
Stefan Bethke <stb at lassitu.de> wrote:
>> Hi Alexsandr,
>>
>> I'v now created a driver for my RTL8366RB, and I can load and unload
>> it, and have it initialize the switch.
>>
>> I've tried to understand how the pieces fit together in your switch
>> framework, and how I would integrate my driver with it. Any chance
>> you could give me quick run through how the userland device, the
>> switch bus and the individual switch drivers are talking to each
>> other?
Hi Stefan,
sorry for delay, need at least two more clones of myself :)
no problem, but currently switch framework very broken :)
But let me explain how it must works.
sys/dev/switch:
switch.c - core logic
switch_if.m - newbus methods to call from core to drv
switchb_if.m - newbus methods to call from drv to core
switch_ioctl.h - driver IOCTL, exported to userland for switchctl
switch_${busglue}.c - glue to attach to different buses (mii,
obio, iicbus, spi), currently works (somehow)
mii and obio.
${family}_switch.c - switch driver
${family}_switchreg.h - switch registers definitions
${family}_switchvar.h - per driver structures
sbin/switchctl - still dumb tool for switch manipulation
most useful thing of it - get/set reg :)
Ohh, need write many manuals for it, but still busy with servers @job.
Anyway, questions/comments are welcomed!
>>
>>
>> Thanks,
>> Stefan
>>
>> --
>> Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811
>>
>>
>>
WBW
--
Alexandr Rybalko <ray at dlink.ua>
aka Alex RAY <ray at ddteam.net>
More information about the freebsd-embedded
mailing list