Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 00:35:16 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        Aleksandr Rybalko <ray@freebsd.org>
Cc:        freebsd-net@FreeBSD.org, freebsd-arch@FreeBSD.org
Subject:   Re: Ethernet Switch Framework
Message-ID:  <A930BAFE-E92B-4F12-9DC9-5C3461B2E816@lassitu.de>
In-Reply-To: <20120120221319.ca8b631f.ray@freebsd.org>
References:  <20120120221319.ca8b631f.ray@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you for the update, that clears up a number of questions I had.

Here's a couple of questions and comments.

Which devices can this code be run on?  For example, can the AR7240 =
config run on an TL-WR3420?

Would you mind giving an overview of how the various parts fit together, =
how they are probed and attached?  I think I understand from you =
explanations on IRC, but not everbody had that chance.

Am 20.01.2012 um 21:13 schrieb Aleksandr Rybalko:

> get/set reg:
> Generic access to registers. Have 2 address modifiers:
> 0x00000000(no modifiers) - access to parent space (parent MDIO bus, if
> switchX attaches to miibusX)
> 0x40000000 - access to switch MDIO bus
> 0x80000000 - access to switch registers.

Wouldn't it be better to have a proper API to select the various busses =
and device register files?

> FloatPHY
> pseudo driver which attach to miibus like normal PHY, but do find
> master switchX device and ask his PHY reg's. Main problem with that
> driver - is usage of newbus calls between independent device (not a
> parent <-> child), since floatphyX query set/get methods of switchX.

The general approach has a number of problems, as far as I understand =
the miibus code.  miibus assumes that only one of the PHYs on the MII is =
active concurrently (since that's a requirement of the MII/GMII/... =
bus).  If I read your code correctly, you have one miibus that has all =
the PHYs for all switch ports on them.  Won't miibus just isolate all =
but one PHY?

In your current implementation, you've reimplented ukphy (in a limited =
fashion).  One of the advantages of reusing the mii framework is being =
able to use all the PHYs, in case a switch chip would include a quirky =
PHY.  Extending floatphy to work as a full proxy for any phy driver =
looks non-trivial to me due to the API constraints the mii framework =
imposes.


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?A930BAFE-E92B-4F12-9DC9-5C3461B2E816>