netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: dsa: Plug in PHYLINK support
@ 2018-03-18 18:52 Florian Fainelli
  2018-03-18 18:52 ` [PATCH net-next 1/4] net: dsa: Eliminate dsa_slave_get_link() Florian Fainelli
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Florian Fainelli @ 2018-03-18 18:52 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, privat, andrew, vivien.didelot, davem,
	rmk+kernel, sean.wang, Woojung.Huh, john, cphealy

Hi all,

This patch series adds PHYLINK support to DSA which is necessary to support more
complex PHY and pluggable modules setups.

Patch series can be found here:

https://github.com/ffainelli/linux/commits/dsa-phylink

This was tested on:

- dsa-loop
- bcm_sf2
- mv88e6xxx
- b53

With a variety of test cases:
- internal & external MDIO PHYs
- MoCA with link notification through interrupt/MMIO register
- built-in PHYs
- ifconfig up/down for several cycles works
- bind/unbind of the drivers

And everything should still work as expected. Please be aware of the following:

- switch drivers (like bcm_sf2) which may have user-facing network ports using
  fixed links would need to implement phylink_mac_ops to remain functional.
  PHYLINK does not create a phy_device for fixed links, therefore our
  call to adjust_link() from phylink_mac_link_{up,down} would not be calling
  into the driver. This *should not* affect CPU/DSA ports which are configured
  through adjust_link() but have no network devices

- support for SFP/SFF is now possible, but switch drivers will still need some
  modifications to properly support those, including, but not limited to using
  the correct binding information. This will be submitted on top of this series

Russell, we could theoretically eliminate patch 3 and resolve this within DSA
entirely by keeping a per-port phy_interface_t (we did that before), this is
not a big change if we have to, let me know if you feel like this is cleaner. I
was initially considering passing a phylink_link_state reference to
mac_link_{up,down} but only a couple of fields are valid during link_down and
ended up with passing the phy_interface_t value we need instead. This is
necessary for switch drivers which have different types of port interfaces (see
bcm_sf2 documentation in tree).

Thank you!

Florian Fainelli (4):
  net: dsa: Eliminate dsa_slave_get_link()
  net: phy: phylink: Provide PHY interface to mac_link_{up,down}
  net: dsa: Plug in PHYLINK support
  net: dsa: bcm_sf2: Implement phylink_mac_ops

 drivers/net/dsa/bcm_sf2.c             | 190 +++++++++++++--------
 drivers/net/ethernet/marvell/mvneta.c |   4 +-
 drivers/net/phy/phylink.c             |   6 +-
 include/linux/phylink.h               |  10 +-
 include/net/dsa.h                     |  27 ++-
 net/dsa/Kconfig                       |   2 +-
 net/dsa/dsa_priv.h                    |   9 -
 net/dsa/slave.c                       | 304 ++++++++++++++++++++--------------
 8 files changed, 340 insertions(+), 212 deletions(-)

-- 
2.14.1

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

end of thread, other threads:[~2018-03-28  9:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 18:52 [PATCH net-next 0/4] net: dsa: Plug in PHYLINK support Florian Fainelli
2018-03-18 18:52 ` [PATCH net-next 1/4] net: dsa: Eliminate dsa_slave_get_link() Florian Fainelli
2018-03-18 19:12   ` Andrew Lunn
2018-03-18 18:52 ` [PATCH net-next 2/4] net: phy: phylink: Provide PHY interface to mac_link_{up,down} Florian Fainelli
2018-03-28  9:50   ` Russell King - ARM Linux
2018-03-18 18:52 ` [PATCH net-next 3/4] net: dsa: Plug in PHYLINK support Florian Fainelli
2018-03-18 19:19   ` Andrew Lunn
2018-03-19 17:59     ` Florian Fainelli
2018-03-19 18:09       ` Russell King - ARM Linux
2018-03-19 18:11         ` Florian Fainelli
2018-03-18 18:52 ` [PATCH net-next 4/4] net: dsa: bcm_sf2: Implement phylink_mac_ops Florian Fainelli
2018-03-19  0:11 ` [PATCH net-next 0/4] net: dsa: Plug in PHYLINK support Florian Fainelli
2018-03-19 13:44   ` Andrew Lunn
2018-03-19 17:45     ` Florian Fainelli
2018-03-20 15:28 ` David Miller
2018-03-20 15:51   ` Andrew Lunn

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