Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Dec 2011 14:36:30 +0200
From:      Aleksandr Rybalko <ray@dlink.ua>
To:        Stefan Bethke <stb@lassitu.de>
Cc:        embedded@freebsd.org
Subject:   Re: Ethernet switch framework
Message-ID:  <20111208143630.8bfa62c9.ray@dlink.ua>
In-Reply-To: <2B013790-6DB4-4E1A-857C-5EC39F4F71C9@lassitu.de>
References:  <20111110014904.0e8caf2c.ray@ddteam.net> <2B013790-6DB4-4E1A-857C-5EC39F4F71C9@lassitu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Dec 2011 00:16:45 +0100
Stefan Bethke <stb@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@lassitu.de>   Fon +49 151 14070811
>> 
>> 
>> 

WBW
-- 
Alexandr Rybalko <ray@dlink.ua> 
aka Alex RAY <ray@ddteam.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111208143630.8bfa62c9.ray>