netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: dsa: master and slave helpers
@ 2017-10-12 22:51 Vivien Didelot
  2017-10-12 22:51 ` [PATCH net-next 1/5] net: dsa: use port's cpu_dp when creating a slave Vivien Didelot
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Vivien Didelot @ 2017-10-12 22:51 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot

This patch series adds a few helpers to DSA core for clarity and
readability but brings no functional changes.

A dsa_slave_notify helper calls the DSA notifiers when (un)registering a
slave device.

Most of the DSA slave code only needs to access the dsa_port structure,
not the dsa_slave_priv (which only contains a few PHY-specific members).
Thus a dsa_slave_to_port helper returns a dsa_port structure of a slave
device.

A dsa_slave_get_master returns the master device of a slave device.

After that the netdev member of the dsa_port structure is split into two
explicit master and slave members to avoid confusion, even though it is
not planned to create a slave for DSA or CPU ports for the moment.

Vivien Didelot (5):
  net: dsa: use port's cpu_dp when creating a slave
  net: dsa: add slave notify helper
  net: dsa: add slave to port helper
  net: dsa: add slave get master helper
  net: dsa: split dsa_port's netdev member

 drivers/net/dsa/bcm_sf2.c        |   6 +-
 drivers/net/dsa/mt7530.c         |   2 +-
 drivers/net/dsa/mv88e6xxx/chip.c |   2 +-
 include/net/dsa.h                |   7 +-
 net/dsa/dsa.c                    |   6 +-
 net/dsa/dsa2.c                   |  22 ++--
 net/dsa/dsa_priv.h               |  22 ++--
 net/dsa/legacy.c                 |  20 ++--
 net/dsa/slave.c                  | 227 +++++++++++++++++++--------------------
 net/dsa/tag_brcm.c               |   9 +-
 net/dsa/tag_dsa.c                |  10 +-
 net/dsa/tag_edsa.c               |  10 +-
 net/dsa/tag_ksz.c                |   4 +-
 net/dsa/tag_lan9303.c            |   4 +-
 net/dsa/tag_mtk.c                |   4 +-
 net/dsa/tag_qca.c                |   5 +-
 net/dsa/tag_trailer.c            |   4 +-
 17 files changed, 183 insertions(+), 181 deletions(-)

-- 
2.14.2

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

end of thread, other threads:[~2017-10-13 16:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 22:51 [PATCH net-next 0/5] net: dsa: master and slave helpers Vivien Didelot
2017-10-12 22:51 ` [PATCH net-next 1/5] net: dsa: use port's cpu_dp when creating a slave Vivien Didelot
2017-10-12 22:53   ` Florian Fainelli
2017-10-12 22:51 ` [PATCH net-next 2/5] net: dsa: add slave notify helper Vivien Didelot
2017-10-12 22:55   ` Florian Fainelli
2017-10-12 22:51 ` [PATCH net-next 3/5] net: dsa: add slave to port helper Vivien Didelot
2017-10-12 22:59   ` Florian Fainelli
2017-10-12 22:51 ` [PATCH net-next 4/5] net: dsa: add slave get master helper Vivien Didelot
2017-10-12 23:02   ` Florian Fainelli
2017-10-12 23:23     ` Vivien Didelot
2017-10-12 22:51 ` [PATCH net-next 5/5] net: dsa: split dsa_port's netdev member Vivien Didelot
2017-10-12 23:05   ` Florian Fainelli
2017-10-12 23:21     ` Vivien Didelot
2017-10-13 14:02     ` David Laight
2017-10-13 14:26       ` Vivien Didelot
2017-10-13 15:29         ` Vivien Didelot
2017-10-13 16:10           ` David Laight
2017-10-13 16:50             ` Vivien Didelot

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