public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin•com>
To: Vladimir Oltean <olteanv@gmail•com>
Cc: Andrew Lunn <andrew@lunn•ch>,
	"David S. Miller" <davem@davemloft•net>,
	netdev <netdev@vger•kernel.org>,
	Vivien Didelot <vivien.didelot@gmail•com>,
	Florian Fainelli <f.fainelli@gmail•com>,
	Russell King - ARM Linux admin <linux@armlinux•org.uk>,
	Antoine Tenart <antoine.tenart@bootlin•com>,
	Horatiu Vultur <horatiu.vultur@microchip•com>,
	"Allan W. Nielsen" <allan.nielsen@microchip•com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip•com>,
	Alexandru Marginean <alexandru.marginean@nxp•com>,
	Claudiu Manoil <claudiu.manoil@nxp•com>,
	"Madalin Bucur (OSS)" <madalin.bucur@oss•nxp.com>,
	radu-andrei.bulie@nxp•com, fido_max@inbox•ru
Subject: Re: [PATCH net-next 11/11] net: dsa: ocelot: introduce driver for Seville VSC9953 switch
Date: Fri, 29 May 2020 10:14:41 +0200	[thread overview]
Message-ID: <20200529081441.GW3972@piout.net> (raw)
In-Reply-To: <CA+h21hoVQPVJiYDQV7j+d7Vt8o5rK+Z8APO2Hp85Dt8cOU7e4w@mail.gmail.com>

On 29/05/2020 01:09:16+0300, Vladimir Oltean wrote:
> On Fri, 29 May 2020 at 00:56, Andrew Lunn <andrew@lunn•ch> wrote:
> >
> > > Extending the Felix driver to probe a PCI as well as a platform device
> > > would have introduced unnecessary complexity. The 'meat' of both drivers
> > > is in drivers/net/ethernet/mscc/ocelot*.c anyway, so let's just
> > > duplicate the Felix driver, s/Felix/Seville/, and define the low-level
> > > bits in seville_vsc9953.c.
> >
> > Hi Vladimir
> >
> > That has resulted in a lot of duplicated code.
> >
> > Is there an overall family name for these switch?
> >
> > Could you add foo_set_ageing_time() with both felix and saville share?
> >
> >       Andrew
> 
> Yes, it looks like I can. I can move Felix PCI probing to
> felix_vsc9959.c, Seville platform device probing to seville_vsc9953.c,
> and remove seville.c.
> I would not be in a position to know whether there's any larger family
> name which should be used here. According to
> https://media.digikey.com/pdf/Data%20Sheets/Microsemi%20PDFs/Ocelot_Family_of_Ethernet_Switches_Dec2016.pdf,
> "Ocelot is a low port count, small form factor Ethernet switch family
> for the Industrial IoT market". Seville would not qualify as part of
> the Ocelot family (high port count, no 1588) but that doesn't mean it
> can't use the Ocelot driver. As confusing as it might be for the
> people at Microchip, I would tend to call anything that probes as pure
> switchdev "ocelot" and anything that probes as DSA "felix", since

As ocelot can be used in a DSA configuration (even if it is not
implemented yet), I don't think this would be correct. From my point of
view, felix and seville are part of the ocelot family.

> these were the first 2 drivers that entered mainline. Under this
> working model, Seville would reuse the struct dsa_switch_ops
> felix_switch_ops, while having its own low-level seville_vsc9953.c
> that deals with platform integration specific stuff (probing, internal
> MDIO, register map, etc), and the felix_switch_ops would call into
> ocelot for the common functionalities.
> What do you think?
> 
> -Vladimir

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-05-29  8:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 23:41 [PATCH net-next 00/11] New DSA driver for VSC9953 Seville switch Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 01/11] regmap: add helper for per-port regfield initialization Vladimir Oltean
2020-05-27 23:46   ` Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 02/11] net: mscc: ocelot: unexport ocelot_probe_port Vladimir Oltean
2020-05-28 16:21   ` Jakub Kicinski
2020-05-28 16:35     ` Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 03/11] net: mscc: ocelot: convert port registers to regmap Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 04/11] soc/mscc: ocelot: add MII registers description Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 05/11] net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 06/11] net: dsa: ocelot: create a template for the DSA tags on xmit Vladimir Oltean
2020-05-28 14:50   ` Andrew Lunn
2020-05-29 19:31     ` Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 07/11] net: mscc: ocelot: split writes to pause frame enable bit and to thresholds Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 08/11] net: mscc: ocelot: disable flow control on NPI interface Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 09/11] net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 10/11] net: mscc: ocelot: extend watermark encoding function Vladimir Oltean
2020-05-27 23:41 ` [PATCH net-next 11/11] net: dsa: ocelot: introduce driver for Seville VSC9953 switch Vladimir Oltean
2020-05-28 16:21   ` Jakub Kicinski
2020-05-28 16:51     ` Vladimir Oltean
2020-05-28 21:56   ` Andrew Lunn
2020-05-28 22:09     ` Vladimir Oltean
2020-05-29  8:14       ` Alexandre Belloni [this message]
2020-05-29  8:30         ` Vladimir Oltean
2020-05-29  9:03           ` Alexandre Belloni
2020-05-29 15:42             ` Vladimir Oltean
2020-05-29 17:20               ` Alexandre Belloni
2020-05-29 16:51 ` [PATCH net-next 00/11] New DSA driver for VSC9953 Seville switch Mark Brown
2020-05-29 16:59   ` Mark Brown
2020-05-29 17:28     ` Vladimir Oltean
2020-05-29 17:34       ` Mark Brown
2020-05-29 17:49         ` Vladimir Oltean

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=20200529081441.GW3972@piout.net \
    --to=alexandre.belloni@bootlin$(echo .)com \
    --cc=UNGLinuxDriver@microchip$(echo .)com \
    --cc=alexandru.marginean@nxp$(echo .)com \
    --cc=allan.nielsen@microchip$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=antoine.tenart@bootlin$(echo .)com \
    --cc=claudiu.manoil@nxp$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=fido_max@inbox$(echo .)ru \
    --cc=horatiu.vultur@microchip$(echo .)com \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=madalin.bucur@oss$(echo .)nxp.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=olteanv@gmail$(echo .)com \
    --cc=radu-andrei.bulie@nxp$(echo .)com \
    --cc=vivien.didelot@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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