netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH RFC v2 00/32] Make DSA switches linux devices.
Date: Fri, 11 Mar 2016 15:41:59 -0800	[thread overview]
Message-ID: <56E357C7.7090309@gmail.com> (raw)
In-Reply-To: <20160303202716.GQ15541@lunn.ch>

On 03/03/16 12:27, Andrew Lunn wrote:
>> - first of all, the original design around the special platform device
>> did not allow multiple switch trees within the same system to coexist
>> (dsa platform device were not numbered (id = -1)), but such a thing
>> could exist and is desirable, you could have a single switch hanging off
>> eth0, and more switches hanging off eth1 for instance, and not be part
>> of the same tree
> 
> I have hardware i can test such a setup on. 
> 
>>
>> - the direction we want to move people to is to make them use DSA for
>> their switch needs and get the proven benefits from having a consistent
>> per-port slave network device model along with a good binding for
>> representing ports within a switch (and all thedetails associated with
>> that), the next step is to make this available to not just MDIO drivers,
>> which you are addressing here, but then, being able to call
>> dsa_switch_register() just becomes a service from the network stack with
>> DSA support included, if we need the special dsa platform device again,
>> we are not way better than where we were before
> 
> We are a bit better. dsa_switch_register() does not care about the
> communication channel to the switch. An SPI based switch should now be
> possible, as well as a cleaner way to do MMIO switches.

Right, thanks to your patch series and recent efforts, and that is
exactly the direction we want.

[snip]

> 
> The third switch is as you would expect, dsa,member = <0 2>;

I like that representation.

> 
> The probe order does not actually matter. You allocate the dst when
> the first switch arrives, and plug that switch in. You then evaluate
> the dst. Are all dsa links fulfilled. If yes, you have the full tree,
> and you can set it up and running. If no, wait until more switches are
> registered.

So does that mean you agree we do not need the DSA platform device
anymore :)? If not, why, and how much help from the Device Tree do we
need to instantiate that special "dsa" platform device?

> 
> This is quite a big change, so why not make it bigger...
> 
> One thing i don't like is the complexity we have in matching phys to
> ports, and fixed-link phys. Maybe we should consolidate this:

Very true, we support a wide variety of setups, and that creates a lot
of complexity that could probably be absorbed by a more generic helper
function?

> 
> 1) The switch device should use mdiobus_alloc()/mdiobus_register() for
> its own MDIO bus.

Agreed, possibly with the help of the DSA slave code, since some of that
is already doing its magic for most drivers here.

> 2) ports use phy-handle to point to phys on their own mdio bus.

I would refrain from needing that unless the mapping between Port and
built-in PHY is design/board-level configurable, or we connect to PHYs
external to the switch which are not located on its own internal MDIO
bus controller.
-- 
Florian

  reply	other threads:[~2016-03-11 23:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-28 16:41 [PATCH RFC v2 00/32] Make DSA switches linux devices Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 01/32] net: dsa: Move platform data allocation for OF Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 02/32] dsa: Rename mv88e6123_61_65 to mv88e6123 to be consistent Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 03/32] dsa: Make setup and finish more symmetrical Andrew Lunn
2016-03-11 23:54   ` Florian Fainelli
2016-02-28 16:41 ` [PATCH RFC v2 04/32] net: dsa: Pass the dsa device to the switch drivers Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 05/32] net: dsa: Have the switch driver allocate there own private memory Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 06/32] net: dsa: Remove allocation of driver " Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 07/32] net: dsa: Keep the mii bus and address in the private structure Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 08/32] net: dsa: dsa.c: Refactor to increase symmetry Andrew Lunn
2016-03-11 23:54   ` Florian Fainelli
2016-02-28 16:41 ` [PATCH RFC v2 09/32] driver: component: Add support for empty match table Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 10/32] net: dsa: Add basic support for component master support Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 11/32] net: dsa: Keep a reference to the switch device for component matching Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 12/32] net: dsa: Add slave component matches based on a phandle to the slave Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 13/32] net: dsa: Make dsa,mii-bus optional Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 14/32] net: dsa: Add register/unregister functions for switch drivers Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 15/32] net: dsa: Rename DSA probe function Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 16/32] dsa: mv88e6xxx: Use bus in mv88e6xxx_lookup_name() Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 17/32] dsa: mv88e6xxx: Add shared code for binding/unbinding a switch driver Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 18/32] dsa: mv88e6xxx: Prepare for turning this into a library module Andrew Lunn
2016-02-29  2:40   ` Vivien Didelot
2016-02-29 14:53     ` Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 19/32] dsa: mv88e6xxx: Add macro for registering the drivers Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 20/32] dsa: Add mdio device support to Marvell switches Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 21/32] net: mdio: Add mdiodev_{read|write} helpers Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 22/32] net: dsa: Better integrate the drivers with mdio device Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 23/32] net: dsa: bcm_sf2: make it a real platform driver Andrew Lunn
2016-03-03 18:33   ` Florian Fainelli
2016-03-03 19:12     ` Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 24/32] net: dsa: Add some debug prints for error cases Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 25/32] net: dsa: Setup the switches after all have been probed Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 26/32] net: dsa: Only setup platform switches, not device switches Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 27/32] net: dsa: If a switch fails to probe, defer probing Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 28/32] Documentation: DSA: Describe how probe of DSA and switches work Andrew Lunn
2016-02-29 11:42   ` Sergei Shtylyov
2016-02-28 16:41 ` [PATCH RFC v2 29/32] dsa: slave: Don't reference NULL pointer during phy_disconnect Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 30/32] dsa: Destroy fixed link phys after the phy has been disconnected Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 31/32] dsa: dsa: Fix freeing of fixed-phys from user ports Andrew Lunn
2016-02-28 16:41 ` [PATCH RFC v2 32/32] phy: fixed: Fix removal of phys Andrew Lunn
2016-03-03 18:49 ` [PATCH RFC v2 00/32] Make DSA switches linux devices Florian Fainelli
2016-03-03 20:27   ` Andrew Lunn
2016-03-11 23:41     ` Florian Fainelli [this message]
2016-03-12 17:08       ` Andrew Lunn
2016-03-13  7:26         ` Vivien Didelot
2016-03-14 19:36         ` Florian Fainelli
2016-03-14 20:51           ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E357C7.7090309@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).