aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristram Ha <Tristram.Ha@microchip.com>2018-12-14 19:58:04 -0500
committerDavid S. Miller <davem@davemloft.net>2018-12-16 17:23:33 -0500
commit39d6b96f9fc2d99c4619954f462ba32e5d48502e (patch)
tree124968c3318bbbc13e1218817a18fd37990bfb7f
parent036b9e7caeb09598afb297a6d4fb36b477a4f6b2 (diff)
net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477
Rename the tag Kconfig option and related macros in preparation for addition of new KSZ family switches with different tag formats. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Cc: Woojung Huh <woojung.huh@microchip.com> Cc: David S. Miller <davem@davemloft.net> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/microchip/Kconfig2
-rw-r--r--drivers/net/dsa/microchip/ksz9477.c2
-rw-r--r--include/net/dsa.h2
-rw-r--r--net/dsa/Kconfig4
-rw-r--r--net/dsa/dsa.c8
-rw-r--r--net/dsa/dsa_priv.h2
-rw-r--r--net/dsa/tag_ksz.c2
7 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/dsa/microchip/Kconfig b/drivers/net/dsa/microchip/Kconfig
index a8caf9249d50..bea29fde9f3d 100644
--- a/drivers/net/dsa/microchip/Kconfig
+++ b/drivers/net/dsa/microchip/Kconfig
@@ -4,7 +4,7 @@ config NET_DSA_MICROCHIP_KSZ_COMMON
4menuconfig NET_DSA_MICROCHIP_KSZ9477 4menuconfig NET_DSA_MICROCHIP_KSZ9477
5 tristate "Microchip KSZ9477 series switch support" 5 tristate "Microchip KSZ9477 series switch support"
6 depends on NET_DSA 6 depends on NET_DSA
7 select NET_DSA_TAG_KSZ 7 select NET_DSA_TAG_KSZ9477
8 select NET_DSA_MICROCHIP_KSZ_COMMON 8 select NET_DSA_MICROCHIP_KSZ_COMMON
9 help 9 help
10 This driver adds support for Microchip KSZ9477 switch chips. 10 This driver adds support for Microchip KSZ9477 switch chips.
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 0684657fbf9a..57a146a0dd4a 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -262,7 +262,7 @@ static int ksz9477_reset_switch(struct ksz_device *dev)
262static enum dsa_tag_protocol ksz9477_get_tag_protocol(struct dsa_switch *ds, 262static enum dsa_tag_protocol ksz9477_get_tag_protocol(struct dsa_switch *ds,
263 int port) 263 int port)
264{ 264{
265 return DSA_TAG_PROTO_KSZ; 265 return DSA_TAG_PROTO_KSZ9477;
266} 266}
267 267
268static int ksz9477_phy_read16(struct dsa_switch *ds, int addr, int reg) 268static int ksz9477_phy_read16(struct dsa_switch *ds, int addr, int reg)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 6ee2e24e0a6e..b3eefe8e18fd 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -36,7 +36,7 @@ enum dsa_tag_protocol {
36 DSA_TAG_PROTO_DSA, 36 DSA_TAG_PROTO_DSA,
37 DSA_TAG_PROTO_EDSA, 37 DSA_TAG_PROTO_EDSA,
38 DSA_TAG_PROTO_GSWIP, 38 DSA_TAG_PROTO_GSWIP,
39 DSA_TAG_PROTO_KSZ, 39 DSA_TAG_PROTO_KSZ9477,
40 DSA_TAG_PROTO_LAN9303, 40 DSA_TAG_PROTO_LAN9303,
41 DSA_TAG_PROTO_MTK, 41 DSA_TAG_PROTO_MTK,
42 DSA_TAG_PROTO_QCA, 42 DSA_TAG_PROTO_QCA,
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 48c41918fb35..91e52973ee13 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -44,6 +44,10 @@ config NET_DSA_TAG_GSWIP
44config NET_DSA_TAG_KSZ 44config NET_DSA_TAG_KSZ
45 bool 45 bool
46 46
47config NET_DSA_TAG_KSZ9477
48 bool
49 select NET_DSA_TAG_KSZ
50
47config NET_DSA_TAG_LAN9303 51config NET_DSA_TAG_LAN9303
48 bool 52 bool
49 53
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index a69c1790bbfc..aee909bcddc4 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -55,8 +55,8 @@ const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
55#ifdef CONFIG_NET_DSA_TAG_GSWIP 55#ifdef CONFIG_NET_DSA_TAG_GSWIP
56 [DSA_TAG_PROTO_GSWIP] = &gswip_netdev_ops, 56 [DSA_TAG_PROTO_GSWIP] = &gswip_netdev_ops,
57#endif 57#endif
58#ifdef CONFIG_NET_DSA_TAG_KSZ 58#ifdef CONFIG_NET_DSA_TAG_KSZ9477
59 [DSA_TAG_PROTO_KSZ] = &ksz_netdev_ops, 59 [DSA_TAG_PROTO_KSZ9477] = &ksz9477_netdev_ops,
60#endif 60#endif
61#ifdef CONFIG_NET_DSA_TAG_LAN9303 61#ifdef CONFIG_NET_DSA_TAG_LAN9303
62 [DSA_TAG_PROTO_LAN9303] = &lan9303_netdev_ops, 62 [DSA_TAG_PROTO_LAN9303] = &lan9303_netdev_ops,
@@ -91,8 +91,8 @@ const char *dsa_tag_protocol_to_str(const struct dsa_device_ops *ops)
91#ifdef CONFIG_NET_DSA_TAG_GSWIP 91#ifdef CONFIG_NET_DSA_TAG_GSWIP
92 [DSA_TAG_PROTO_GSWIP] = "gswip", 92 [DSA_TAG_PROTO_GSWIP] = "gswip",
93#endif 93#endif
94#ifdef CONFIG_NET_DSA_TAG_KSZ 94#ifdef CONFIG_NET_DSA_TAG_KSZ9477
95 [DSA_TAG_PROTO_KSZ] = "ksz", 95 [DSA_TAG_PROTO_KSZ9477] = "ksz9477",
96#endif 96#endif
97#ifdef CONFIG_NET_DSA_TAG_LAN9303 97#ifdef CONFIG_NET_DSA_TAG_LAN9303
98 [DSA_TAG_PROTO_LAN9303] = "lan9303", 98 [DSA_TAG_PROTO_LAN9303] = "lan9303",
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 9e4fd04ab53c..026a05774bf7 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -210,7 +210,7 @@ extern const struct dsa_device_ops edsa_netdev_ops;
210extern const struct dsa_device_ops gswip_netdev_ops; 210extern const struct dsa_device_ops gswip_netdev_ops;
211 211
212/* tag_ksz.c */ 212/* tag_ksz.c */
213extern const struct dsa_device_ops ksz_netdev_ops; 213extern const struct dsa_device_ops ksz9477_netdev_ops;
214 214
215/* tag_lan9303.c */ 215/* tag_lan9303.c */
216extern const struct dsa_device_ops lan9303_netdev_ops; 216extern const struct dsa_device_ops lan9303_netdev_ops;
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c
index 96411f70ab9f..c24a333e55bd 100644
--- a/net/dsa/tag_ksz.c
+++ b/net/dsa/tag_ksz.c
@@ -96,7 +96,7 @@ static struct sk_buff *ksz_rcv(struct sk_buff *skb, struct net_device *dev,
96 return skb; 96 return skb;
97} 97}
98 98
99const struct dsa_device_ops ksz_netdev_ops = { 99const struct dsa_device_ops ksz9477_netdev_ops = {
100 .xmit = ksz_xmit, 100 .xmit = ksz_xmit,
101 .rcv = ksz_rcv, 101 .rcv = ksz_rcv,
102 .overhead = KSZ_INGRESS_TAG_LEN, 102 .overhead = KSZ_INGRESS_TAG_LEN,