linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/9] net: pcs: Add support for devices probed in the "usual" manner
@ 2022-07-11 16:05 Sean Anderson
  2022-07-11 16:05 ` [RFC PATCH net-next 1/9] dt-bindings: net: Add lynx PCS Sean Anderson
                   ` (9 more replies)
  0 siblings, 10 replies; 43+ messages in thread
From: Sean Anderson @ 2022-07-11 16:05 UTC (permalink / raw)
  To: Heiner Kallweit, Russell King, netdev
  Cc: Jakub Kicinski, Madalin Bucur, David S . Miller, Paolo Abeni,
	Ioana Ciornei, linux-kernel, Eric Dumazet, Andrew Lunn,
	Sean Anderson, Alexandre Belloni, Benjamin Herrenschmidt,
	Claudiu Manoil, Florian Fainelli, Frank Rowand,
	Krzysztof Kozlowski, Li Yang, Michael Ellerman, Paul Mackerras,
	Rob Herring, Saravana Kannan, Shawn Guo, UNGLinuxDriver,
	Vivien Didelot, Vladimir Oltean, devicetree, linux-arm-kernel,
	linuxppc-dev

For a long time, PCSs have been tightly coupled with their MACs. For
this reason, the MAC creates the "phy" or mdio device, and then passes
it to the PCS to initialize. This has a few disadvantages:

- Each MAC must re-implement the same steps to look up/create a PCS
- The PCS cannot use functions tied to device lifetime, such as devm_*.
- Generally, the PCS does not have easy access to its device tree node

I'm not sure if these are terribly large disadvantages. In fact, I'm not
sure if this series provides any benefit which could not be achieved
with judicious use of helper functions. In any case, here it is.

NB: Several (later) patches in this series should not be applied. See
the notes in each commit for details on when they can be applied.


Sean Anderson (9):
  dt-bindings: net: Add lynx PCS
  dt-bindings: net: Expand pcs-handle to an array
  net: pcs: Add helpers for registering and finding PCSs
  net: pcs: lynx: Convert to an mdio driver
  net: pcs: lynx: Use pcs_get_by_provider to get PCS
  net: pcs: lynx: Remove lynx_get_mdio_device and lynx_pcs_destroy
  arm64: dts: Add compatible strings for Lynx PCSs
  powerpc: dts: Add compatible strings for Lynx PCSs
  net: pcs: lynx: Remove remaining users of lynx_pcs_create

 .../bindings/net/ethernet-controller.yaml     |   7 +-
 .../devicetree/bindings/net/fsl,lynx-pcs.yaml |  47 ++++
 MAINTAINERS                                   |   1 +
 .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi |  30 ++-
 .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi |  48 ++--
 .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi |  54 +++--
 .../dts/freescale/qoriq-fman3-0-10g-0.dtsi    |   3 +-
 .../dts/freescale/qoriq-fman3-0-10g-1.dtsi    |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-0.dtsi     |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-1.dtsi     |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-2.dtsi     |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-3.dtsi     |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-4.dtsi     |   3 +-
 .../dts/freescale/qoriq-fman3-0-1g-5.dtsi     |   3 +-
 .../fsl/qoriq-fman3-0-10g-0-best-effort.dtsi  |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi     |   3 +-
 .../fsl/qoriq-fman3-0-10g-1-best-effort.dtsi  |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi     |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi     |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi     |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi      |   3 +-
 .../boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi      |   3 +-
 drivers/net/dsa/ocelot/Kconfig                |   2 +
 drivers/net/dsa/ocelot/felix_vsc9959.c        |  26 +-
 drivers/net/dsa/ocelot/seville_vsc9953.c      |  26 +-
 drivers/net/ethernet/freescale/dpaa2/Kconfig  |   1 +
 .../net/ethernet/freescale/dpaa2/dpaa2-mac.c  |  43 +---
 drivers/net/ethernet/freescale/enetc/Kconfig  |   1 +
 .../net/ethernet/freescale/enetc/enetc_pf.c   |  25 +-
 drivers/net/pcs/Kconfig                       |  23 +-
 drivers/net/pcs/Makefile                      |   2 +
 drivers/net/pcs/core.c                        | 226 ++++++++++++++++++
 drivers/net/pcs/pcs-lynx.c                    |  76 ++++--
 drivers/of/property.c                         |   2 +
 include/linux/pcs-lynx.h                      |   6 +-
 include/linux/pcs.h                           |  33 +++
 include/linux/phylink.h                       |   6 +
 47 files changed, 566 insertions(+), 197 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/fsl,lynx-pcs.yaml
 create mode 100644 drivers/net/pcs/core.c
 create mode 100644 include/linux/pcs.h

-- 
2.35.1.1320.gc452695387.dirty


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2022-07-29 22:15 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 16:05 [RFC PATCH net-next 0/9] net: pcs: Add support for devices probed in the "usual" manner Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 1/9] dt-bindings: net: Add lynx PCS Sean Anderson
2022-07-12  8:47   ` Krzysztof Kozlowski
2022-07-12 14:57     ` Sean Anderson
2022-07-12 15:00       ` Krzysztof Kozlowski
2022-07-12 15:06         ` Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 2/9] dt-bindings: net: Expand pcs-handle to an array Sean Anderson
2022-07-12  8:51   ` Krzysztof Kozlowski
2022-07-12 15:06     ` Sean Anderson
2022-07-12 15:18       ` Krzysztof Kozlowski
2022-07-12 15:23         ` Sean Anderson
2022-07-12 15:59         ` Russell King (Oracle)
2022-07-14 10:45           ` Krzysztof Kozlowski
2022-07-18 19:46             ` Rob Herring
2022-07-11 16:05 ` [RFC PATCH net-next 3/9] net: pcs: Add helpers for registering and finding PCSs Sean Anderson
2022-07-11 19:42   ` Saravana Kannan
2022-07-11 19:53     ` Sean Anderson
2022-07-11 20:59   ` Russell King (Oracle)
2022-07-11 21:47     ` Sean Anderson
2022-07-11 21:55       ` Sean Anderson
2022-07-12 15:51       ` Russell King (Oracle)
2022-07-12 23:15         ` Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 4/9] net: pcs: lynx: Convert to an mdio driver Sean Anderson
2022-07-19 16:01   ` Vladimir Oltean
2022-07-19 16:16     ` Sean Anderson
2022-07-19 16:20       ` Vladimir Oltean
2022-07-11 16:05 ` [RFC PATCH net-next 5/9] net: pcs: lynx: Use pcs_get_by_provider to get PCS Sean Anderson
2022-07-19 17:26   ` Vladimir Oltean
2022-07-19 19:41     ` Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 6/9] net: pcs: lynx: Remove lynx_get_mdio_device and lynx_pcs_destroy Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 7/9] arm64: dts: Add compatible strings for Lynx PCSs Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 8/9] powerpc: " Sean Anderson
2022-07-11 16:05 ` [RFC PATCH net-next 9/9] net: pcs: lynx: Remove remaining users of lynx_pcs_create Sean Anderson
2022-07-18 19:44   ` Rob Herring
2022-07-19 15:25 ` [RFC PATCH net-next 0/9] net: pcs: Add support for devices probed in the "usual" manner Vladimir Oltean
2022-07-19 15:28   ` Sean Anderson
2022-07-19 15:38     ` Vladimir Oltean
2022-07-19 15:46       ` Sean Anderson
2022-07-19 18:11         ` Vladimir Oltean
2022-07-19 19:34           ` Sean Anderson
2022-07-20 13:53             ` Vladimir Oltean
2022-07-21 21:42               ` Sean Anderson
     [not found]               ` <8622e12e-66c9-e338-27a1-07e53390881e@seco.com>
2022-07-29 22:15                 ` Sean Anderson

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).