linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] [DSA] adding fields for holding information about upstream-port
@ 2018-12-11 19:33 Frank Wunderlich
  2018-12-11 19:33 ` [PATCH 2/7] [DSA] add helper functions Frank Wunderlich
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Frank Wunderlich @ 2018-12-11 19:33 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Matthias Brugger, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek
  Cc: Frank Wunderlich

based on
https://github.com/openwrt/openwrt/blob/master/target/linux/mediatek/patches-4.14/0033-dsa-multi-cpu.patch

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 include/net/dsa.h  | 4 ++++
 net/dsa/dsa_priv.h | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/include/net/dsa.h b/include/net/dsa.h
index 23690c44e167..3efa81e08993 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -203,6 +203,10 @@ struct dsa_port {
 	struct net_device	*bridge_dev;
 	struct devlink_port	devlink_port;
 	struct phylink		*pl;
+
+	struct net_device	*ethernet;
+	int			upstream;
+
 	/*
 	 * Original copy of the master netdev ethtool_ops
 	 */
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 9e4fd04ab53c..cc0cd7675117 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -81,6 +81,8 @@ struct dsa_slave_priv {
 
 	/* TC context */
 	struct list_head	mall_tc_list;
+
+	struct net_device       *master;
 };
 
 /* dsa.c */
@@ -188,7 +190,10 @@ static inline struct net_device *
 dsa_slave_to_master(const struct net_device *dev)
 {
 	struct dsa_port *dp = dsa_slave_to_port(dev);
+	struct dsa_slave_priv *p = netdev_priv(dev);
 
+	if (p->master)
+		return p->master;
 	return dp->cpu_dp->master;
 }
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2018-12-12 15:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 19:33 [PATCH 1/7] [DSA] adding fields for holding information about upstream-port Frank Wunderlich
2018-12-11 19:33 ` [PATCH 2/7] [DSA] add helper functions Frank Wunderlich
2018-12-11 19:33 ` [PATCH 3/7] [DSA] adding handling of second CPU-Port Frank Wunderlich
2018-12-11 19:33 ` [PATCH 4/7] [DSA] add support for GMAC2 wired to ext Frank Wunderlich
2018-12-11 19:33 ` [PATCH 5/7] [DSA] dsa multi cpu (mt7530.c) Frank Wunderlich
2018-12-11 19:33 ` [PATCH 6/7] [DSA] tell GDMA when we are turning on the special tag Frank Wunderlich
2018-12-11 19:33 ` [PATCH 7/7] [DSA] mt7530 add linking to mdio Frank Wunderlich
2018-12-11 22:37 ` [PATCH 1/7] [DSA] adding fields for holding information about upstream-port Florian Fainelli
2018-12-12 15:12   ` Aw: " Frank Wunderlich

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