aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/dsa/b53/b53_common.c4
-rw-r--r--drivers/net/dsa/b53/b53_priv.h2
-rw-r--r--drivers/net/dsa/bcm_sf2.c9
-rw-r--r--drivers/net/dsa/lan9303-core.c3
-rw-r--r--drivers/net/dsa/lantiq_gswip.c5
-rw-r--r--drivers/net/dsa/microchip/ksz_common.c2
-rw-r--r--drivers/net/dsa/microchip/ksz_common.h2
-rw-r--r--drivers/net/dsa/mt7530.c5
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c3
-rw-r--r--drivers/net/dsa/qca8k.c3
-rw-r--r--drivers/net/dsa/rtl8366rb.c3
-rw-r--r--drivers/net/dsa/vitesse-vsc73xx.c3
-rw-r--r--include/net/dsa.h3
-rw-r--r--net/dsa/dsa_priv.h2
-rw-r--r--net/dsa/port.c4
-rw-r--r--net/dsa/slave.c2
16 files changed, 23 insertions, 32 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index c76892ac4e69..0852e5e08177 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -543,7 +543,7 @@ int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
543} 543}
544EXPORT_SYMBOL(b53_enable_port); 544EXPORT_SYMBOL(b53_enable_port);
545 545
546void b53_disable_port(struct dsa_switch *ds, int port, struct phy_device *phy) 546void b53_disable_port(struct dsa_switch *ds, int port)
547{ 547{
548 struct b53_device *dev = ds->priv; 548 struct b53_device *dev = ds->priv;
549 u8 reg; 549 u8 reg;
@@ -963,7 +963,7 @@ static int b53_setup(struct dsa_switch *ds)
963 if (dsa_is_cpu_port(ds, port)) 963 if (dsa_is_cpu_port(ds, port))
964 b53_enable_cpu_port(dev, port); 964 b53_enable_cpu_port(dev, port);
965 else if (dsa_is_unused_port(ds, port)) 965 else if (dsa_is_unused_port(ds, port))
966 b53_disable_port(ds, port, NULL); 966 b53_disable_port(ds, port);
967 } 967 }
968 968
969 return ret; 969 return ret;
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index 4dc7ee38b258..e3441dcf2d21 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -356,7 +356,7 @@ enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port);
356void b53_mirror_del(struct dsa_switch *ds, int port, 356void b53_mirror_del(struct dsa_switch *ds, int port,
357 struct dsa_mall_mirror_tc_entry *mirror); 357 struct dsa_mall_mirror_tc_entry *mirror);
358int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy); 358int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
359void b53_disable_port(struct dsa_switch *ds, int port, struct phy_device *phy); 359void b53_disable_port(struct dsa_switch *ds, int port);
360void b53_brcm_hdr_setup(struct dsa_switch *ds, int port); 360void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
361void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable); 361void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable);
362int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy); 362int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index f91b8e77d543..c8e3f05e1d72 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -221,8 +221,7 @@ static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
221 return b53_enable_port(ds, port, phy); 221 return b53_enable_port(ds, port, phy);
222} 222}
223 223
224static void bcm_sf2_port_disable(struct dsa_switch *ds, int port, 224static void bcm_sf2_port_disable(struct dsa_switch *ds, int port)
225 struct phy_device *phy)
226{ 225{
227 struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); 226 struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
228 u32 reg; 227 u32 reg;
@@ -241,7 +240,7 @@ static void bcm_sf2_port_disable(struct dsa_switch *ds, int port,
241 if (priv->int_phy_mask & 1 << port && priv->hw_params.num_gphy == 1) 240 if (priv->int_phy_mask & 1 << port && priv->hw_params.num_gphy == 1)
242 bcm_sf2_gphy_enable_set(ds, false); 241 bcm_sf2_gphy_enable_set(ds, false);
243 242
244 b53_disable_port(ds, port, phy); 243 b53_disable_port(ds, port);
245 244
246 /* Power down the port memory */ 245 /* Power down the port memory */
247 reg = core_readl(priv, CORE_MEM_PSM_VDD_CTRL); 246 reg = core_readl(priv, CORE_MEM_PSM_VDD_CTRL);
@@ -692,7 +691,7 @@ static int bcm_sf2_sw_suspend(struct dsa_switch *ds)
692 */ 691 */
693 for (port = 0; port < ds->num_ports; port++) { 692 for (port = 0; port < ds->num_ports; port++) {
694 if (dsa_is_user_port(ds, port) || dsa_is_cpu_port(ds, port)) 693 if (dsa_is_user_port(ds, port) || dsa_is_cpu_port(ds, port))
695 bcm_sf2_port_disable(ds, port, NULL); 694 bcm_sf2_port_disable(ds, port);
696 } 695 }
697 696
698 return 0; 697 return 0;
@@ -788,7 +787,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
788 else if (dsa_is_cpu_port(ds, port)) 787 else if (dsa_is_cpu_port(ds, port))
789 bcm_sf2_imp_setup(ds, port); 788 bcm_sf2_imp_setup(ds, port);
790 else 789 else
791 bcm_sf2_port_disable(ds, port, NULL); 790 bcm_sf2_port_disable(ds, port);
792 } 791 }
793 792
794 b53_configure_vlan(ds); 793 b53_configure_vlan(ds);
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index b4f6e1a67dd9..2ffab7ee3d80 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1091,8 +1091,7 @@ static int lan9303_port_enable(struct dsa_switch *ds, int port,
1091 return lan9303_enable_processing_port(chip, port); 1091 return lan9303_enable_processing_port(chip, port);
1092} 1092}
1093 1093
1094static void lan9303_port_disable(struct dsa_switch *ds, int port, 1094static void lan9303_port_disable(struct dsa_switch *ds, int port)
1095 struct phy_device *phy)
1096{ 1095{
1097 struct lan9303 *chip = ds->priv; 1096 struct lan9303 *chip = ds->priv;
1098 1097
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 27d092cab40e..ee1455758764 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -480,8 +480,7 @@ static int gswip_port_enable(struct dsa_switch *ds, int port,
480 return 0; 480 return 0;
481} 481}
482 482
483static void gswip_port_disable(struct dsa_switch *ds, int port, 483static void gswip_port_disable(struct dsa_switch *ds, int port)
484 struct phy_device *phy)
485{ 484{
486 struct gswip_priv *priv = ds->priv; 485 struct gswip_priv *priv = ds->priv;
487 486
@@ -549,7 +548,7 @@ static int gswip_setup(struct dsa_switch *ds)
549 548
550 /* disable port fetch/store dma on all ports */ 549 /* disable port fetch/store dma on all ports */
551 for (i = 0; i < priv->hw_info->max_ports; i++) 550 for (i = 0; i < priv->hw_info->max_ports; i++)
552 gswip_port_disable(ds, i, NULL); 551 gswip_port_disable(ds, i);
553 552
554 /* enable Switch */ 553 /* enable Switch */
555 gswip_mdio_mask(priv, 0, GSWIP_MDIO_GLOB_ENABLE, GSWIP_MDIO_GLOB); 554 gswip_mdio_mask(priv, 0, GSWIP_MDIO_GLOB_ENABLE, GSWIP_MDIO_GLOB);
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index d89c97724c35..9328b88849d2 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -380,7 +380,7 @@ int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
380} 380}
381EXPORT_SYMBOL_GPL(ksz_enable_port); 381EXPORT_SYMBOL_GPL(ksz_enable_port);
382 382
383void ksz_disable_port(struct dsa_switch *ds, int port, struct phy_device *phy) 383void ksz_disable_port(struct dsa_switch *ds, int port)
384{ 384{
385 struct ksz_device *dev = ds->priv; 385 struct ksz_device *dev = ds->priv;
386 386
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index 0d25bc44f453..21cd794e18f1 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -35,7 +35,7 @@ void ksz_port_mdb_add(struct dsa_switch *ds, int port,
35int ksz_port_mdb_del(struct dsa_switch *ds, int port, 35int ksz_port_mdb_del(struct dsa_switch *ds, int port,
36 const struct switchdev_obj_port_mdb *mdb); 36 const struct switchdev_obj_port_mdb *mdb);
37int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy); 37int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
38void ksz_disable_port(struct dsa_switch *ds, int port, struct phy_device *phy); 38void ksz_disable_port(struct dsa_switch *ds, int port);
39 39
40/* Common register access functions */ 40/* Common register access functions */
41 41
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index c2b61500f958..0390c5e8271a 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -729,8 +729,7 @@ mt7530_port_enable(struct dsa_switch *ds, int port,
729} 729}
730 730
731static void 731static void
732mt7530_port_disable(struct dsa_switch *ds, int port, 732mt7530_port_disable(struct dsa_switch *ds, int port)
733 struct phy_device *phy)
734{ 733{
735 struct mt7530_priv *priv = ds->priv; 734 struct mt7530_priv *priv = ds->priv;
736 735
@@ -1301,7 +1300,7 @@ mt7530_setup(struct dsa_switch *ds)
1301 if (dsa_is_cpu_port(ds, i)) 1300 if (dsa_is_cpu_port(ds, i))
1302 mt7530_cpu_port_enable(priv, i); 1301 mt7530_cpu_port_enable(priv, i);
1303 else 1302 else
1304 mt7530_port_disable(ds, i, NULL); 1303 mt7530_port_disable(ds, i);
1305 } 1304 }
1306 1305
1307 /* Flush the FDB table */ 1306 /* Flush the FDB table */
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d30336f259ce..0c944ed2173e 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2388,8 +2388,7 @@ static int mv88e6xxx_port_enable(struct dsa_switch *ds, int port,
2388 return err; 2388 return err;
2389} 2389}
2390 2390
2391static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port, 2391static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port)
2392 struct phy_device *phydev)
2393{ 2392{
2394 struct mv88e6xxx_chip *chip = ds->priv; 2393 struct mv88e6xxx_chip *chip = ds->priv;
2395 2394
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 195a8a87b984..576b37d12a63 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -801,8 +801,7 @@ qca8k_port_enable(struct dsa_switch *ds, int port,
801} 801}
802 802
803static void 803static void
804qca8k_port_disable(struct dsa_switch *ds, int port, 804qca8k_port_disable(struct dsa_switch *ds, int port)
805 struct phy_device *phy)
806{ 805{
807 struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; 806 struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
808 807
diff --git a/drivers/net/dsa/rtl8366rb.c b/drivers/net/dsa/rtl8366rb.c
index a4d5049df692..40b3974970c6 100644
--- a/drivers/net/dsa/rtl8366rb.c
+++ b/drivers/net/dsa/rtl8366rb.c
@@ -1073,8 +1073,7 @@ rtl8366rb_port_enable(struct dsa_switch *ds, int port,
1073} 1073}
1074 1074
1075static void 1075static void
1076rtl8366rb_port_disable(struct dsa_switch *ds, int port, 1076rtl8366rb_port_disable(struct dsa_switch *ds, int port)
1077 struct phy_device *phy)
1078{ 1077{
1079 struct realtek_smi *smi = ds->priv; 1078 struct realtek_smi *smi = ds->priv;
1080 int ret; 1079 int ret;
diff --git a/drivers/net/dsa/vitesse-vsc73xx.c b/drivers/net/dsa/vitesse-vsc73xx.c
index 9f1b5f2e8a64..d4780610ea8a 100644
--- a/drivers/net/dsa/vitesse-vsc73xx.c
+++ b/drivers/net/dsa/vitesse-vsc73xx.c
@@ -1013,8 +1013,7 @@ static int vsc73xx_port_enable(struct dsa_switch *ds, int port,
1013 return 0; 1013 return 0;
1014} 1014}
1015 1015
1016static void vsc73xx_port_disable(struct dsa_switch *ds, int port, 1016static void vsc73xx_port_disable(struct dsa_switch *ds, int port)
1017 struct phy_device *phy)
1018{ 1017{
1019 struct vsc73xx *vsc = ds->priv; 1018 struct vsc73xx *vsc = ds->priv;
1020 1019
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 2c2c10812814..e8ac5b35ac4a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -364,8 +364,7 @@ struct dsa_switch_ops {
364 */ 364 */
365 int (*port_enable)(struct dsa_switch *ds, int port, 365 int (*port_enable)(struct dsa_switch *ds, int port,
366 struct phy_device *phy); 366 struct phy_device *phy);
367 void (*port_disable)(struct dsa_switch *ds, int port, 367 void (*port_disable)(struct dsa_switch *ds, int port);
368 struct phy_device *phy);
369 368
370 /* 369 /*
371 * Port's MAC EEE settings 370 * Port's MAC EEE settings
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 47a1d1379d15..c6caa58c5c71 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -143,7 +143,7 @@ static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
143int dsa_port_set_state(struct dsa_port *dp, u8 state, 143int dsa_port_set_state(struct dsa_port *dp, u8 state,
144 struct switchdev_trans *trans); 144 struct switchdev_trans *trans);
145int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy); 145int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy);
146void dsa_port_disable(struct dsa_port *dp, struct phy_device *phy); 146void dsa_port_disable(struct dsa_port *dp);
147int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br); 147int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br);
148void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br); 148void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br);
149int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering, 149int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
diff --git a/net/dsa/port.c b/net/dsa/port.c
index 6b114b045162..a2dad10646cb 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -85,7 +85,7 @@ int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy)
85 return 0; 85 return 0;
86} 86}
87 87
88void dsa_port_disable(struct dsa_port *dp, struct phy_device *phy) 88void dsa_port_disable(struct dsa_port *dp)
89{ 89{
90 struct dsa_switch *ds = dp->ds; 90 struct dsa_switch *ds = dp->ds;
91 int port = dp->index; 91 int port = dp->index;
@@ -94,7 +94,7 @@ void dsa_port_disable(struct dsa_port *dp, struct phy_device *phy)
94 dsa_port_set_state_now(dp, BR_STATE_DISABLED); 94 dsa_port_set_state_now(dp, BR_STATE_DISABLED);
95 95
96 if (ds->ops->port_disable) 96 if (ds->ops->port_disable)
97 ds->ops->port_disable(ds, port, phy); 97 ds->ops->port_disable(ds, port);
98} 98}
99 99
100int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br) 100int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 90629b12beaf..7274499293c9 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -122,7 +122,7 @@ static int dsa_slave_close(struct net_device *dev)
122 122
123 phylink_stop(dp->pl); 123 phylink_stop(dp->pl);
124 124
125 dsa_port_disable(dp, dev->phydev); 125 dsa_port_disable(dp);
126 126
127 dev_mc_unsync(master, dev); 127 dev_mc_unsync(master, dev);
128 dev_uc_unsync(master, dev); 128 dev_uc_unsync(master, dev);