dsa: Remove phydev parameter from disable_port call
Subsystems (8)
Andrew Lunn
maintainerPATCH 1/1 dsa: Remove phydev parameter from disable_port call
No current DSA driver makes use of the phydev parameter passed to the disable_port call. Remove it.
Signed-off-by Andrew Lunn <[email protected]>
--- drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/dsa/b53/b53_priv.h | 2 +- drivers/net/dsa/bcm_sf2.c | 9 ++++----- drivers/net/dsa/lan9303-core.c | 3 +-- drivers/net/dsa/lantiq_gswip.c | 5 ++--- drivers/net/dsa/microchip/ksz_common.c | 2 +- drivers/net/dsa/microchip/ksz_common.h | 2 +- drivers/net/dsa/mt7530.c | 5 ++--- drivers/net/dsa/mv88e6xxx/chip.c | 3 +-- drivers/net/dsa/qca8k.c | 3 +-- drivers/net/dsa/rtl8366rb.c | 3 +-- drivers/net/dsa/vitesse-vsc73xx.c | 3 +-- include/net/dsa.h | 3 +-- net/dsa/dsa_priv.h | 2 +- net/dsa/port.c | 4 ++-- net/dsa/slave.c | 2 +- 16 files changed, 23 insertions(+), 32 deletions(-)
drivers/net/dsa/b53/b53_common.c +2 -2
@@ -534,7 +534,7 @@ int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy) }EXPORT_SYMBOL (b53_enable_port); -void b53_disable_port (struct dsa_switch *ds,int port,struct phy_device *phy) +void b53_disable_port (struct dsa_switch *ds,int port) {struct b53_device *dev = ds->priv;u8 reg;
@@ -944,7 +944,7 @@ static int b53_setup(struct dsa_switch *ds)if (dsa_is_cpu_port (ds, port))b53_enable_cpu_port (dev, port);else if (dsa_is_unused_port (ds, port)) -b53_disable_port (ds, port,NULL ); +b53_disable_port (ds, port); }return ret;
drivers/net/dsa/b53/b53_priv.h +1 -1
@@ -353,7 +353,7 @@ enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port);void b53_mirror_del (struct dsa_switch *ds,int port,struct dsa_mall_mirror_tc_entry *mirror);int b53_enable_port (struct dsa_switch *ds,int port,struct phy_device *phy); -void b53_disable_port (struct dsa_switch *ds,int port,struct phy_device *phy); +void b53_disable_port (struct dsa_switch *ds,int port);void b53_brcm_hdr_setup (struct dsa_switch *ds,int port);void b53_eee_enable_set (struct dsa_switch *ds,int port,bool enable);int b53_eee_init (struct dsa_switch *ds,int port,struct phy_device *phy);
drivers/net/dsa/bcm_sf2.c +4 -5
@@ -221,8 +221,7 @@ static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,return b53_enable_port (ds, port, phy); } -static void bcm_sf2_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +static void bcm_sf2_port_disable (struct dsa_switch *ds,int port) {struct bcm_sf2_priv *priv =bcm_sf2_to_priv (ds);u32 reg;
@@ -241,7 +240,7 @@ static void bcm_sf2_port_disable(struct dsa_switch *ds, int port,if (priv->int_phy_mask &1 << port && priv->hw_params.num_gphy ==1 )bcm_sf2_gphy_enable_set (ds, false); -b53_disable_port (ds, port, phy); +b53_disable_port (ds, port);/* Power down the port memory */ reg =core_readl (priv,CORE_MEM_PSM_VDD_CTRL );
@@ -692,7 +691,7 @@ static int bcm_sf2_sw_suspend(struct dsa_switch *ds)*/ for (port =0 ; port <DSA_MAX_PORTS ; port++) {if (dsa_is_user_port (ds, port) ||dsa_is_cpu_port (ds, port)) -bcm_sf2_port_disable (ds, port,NULL ); +bcm_sf2_port_disable (ds, port); }return 0 ;
@@ -786,7 +785,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)else if (dsa_is_cpu_port (ds, port))bcm_sf2_imp_setup (ds, port);else -bcm_sf2_port_disable (ds, port,NULL ); +bcm_sf2_port_disable (ds, port); }b53_configure_vlan (ds);
drivers/net/dsa/lan9303-core.c +1 -2
@@ -1091,8 +1091,7 @@ static int lan9303_port_enable(struct dsa_switch *ds, int port,return lan9303_enable_processing_port (chip, port); } -static void lan9303_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +static void lan9303_port_disable (struct dsa_switch *ds,int port) {struct lan9303 *chip = ds->priv;
drivers/net/dsa/lantiq_gswip.c +2 -3
@@ -480,8 +480,7 @@ static int gswip_port_enable(struct dsa_switch *ds, int port,return 0 ; } -static void gswip_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +static void gswip_port_disable (struct dsa_switch *ds,int port) {struct gswip_priv *priv = ds->priv;
@@ -549,7 +548,7 @@ static int gswip_setup(struct dsa_switch *ds)/* disable port fetch/store dma on all ports */ for (i =0 ; i < priv->hw_info->max_ports; i++) -gswip_port_disable (ds, i,NULL ); +gswip_port_disable (ds, i);/* enable Switch */ gswip_mdio_mask (priv,0 ,GSWIP_MDIO_GLOB_ENABLE ,GSWIP_MDIO_GLOB );
drivers/net/dsa/microchip/ksz_common.c +1 -1
@@ -247,7 +247,7 @@ int ksz_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy) }EXPORT_SYMBOL_GPL (ksz_enable_port); -void ksz_disable_port (struct dsa_switch *ds,int port,struct phy_device *phy) +void ksz_disable_port (struct dsa_switch *ds,int port) {struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.h +1 -1
@@ -30,7 +30,7 @@ void ksz_port_mdb_add(struct dsa_switch *ds, int port,int ksz_port_mdb_del (struct dsa_switch *ds,int port,const struct switchdev_obj_port_mdb *mdb);int ksz_enable_port (struct dsa_switch *ds,int port,struct phy_device *phy); -void ksz_disable_port (struct dsa_switch *ds,int port,struct phy_device *phy); +void ksz_disable_port (struct dsa_switch *ds,int port);/* Common register access functions */
drivers/net/dsa/mt7530.c +2 -3
@@ -729,8 +729,7 @@ mt7530_port_enable(struct dsa_switch *ds, int port, }static void -mt7530_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +mt7530_port_disable (struct dsa_switch *ds,int port) {struct mt7530_priv *priv = ds->priv;
@@ -1301,7 +1300,7 @@ mt7530_setup(struct dsa_switch *ds)if (dsa_is_cpu_port (ds, i))mt7530_cpu_port_enable (priv, i);else -mt7530_port_disable (ds, i,NULL ); +mt7530_port_disable (ds, i); }/* Flush the FDB table */
drivers/net/dsa/mv88e6xxx/chip.c +1 -2
@@ -2388,8 +2388,7 @@ static int mv88e6xxx_port_enable(struct dsa_switch *ds, int port,return err; } -static void mv88e6xxx_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phydev) +static void mv88e6xxx_port_disable (struct dsa_switch *ds,int port) {struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/qca8k.c +1 -2
@@ -789,8 +789,7 @@ qca8k_port_enable(struct dsa_switch *ds, int port, }static void -qca8k_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +qca8k_port_disable (struct dsa_switch *ds,int port) {struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
drivers/net/dsa/rtl8366rb.c +1 -2
@@ -1073,8 +1073,7 @@ rtl8366rb_port_enable(struct dsa_switch *ds, int port, }static void -rtl8366rb_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +rtl8366rb_port_disable (struct dsa_switch *ds,int port) {struct realtek_smi *smi = ds->priv;int ret;
drivers/net/dsa/vitesse-vsc73xx.c +1 -2
@@ -1013,8 +1013,7 @@ static int vsc73xx_port_enable(struct dsa_switch *ds, int port,return 0 ; } -static void vsc73xx_port_disable (struct dsa_switch *ds,int port, -struct phy_device *phy) +static void vsc73xx_port_disable (struct dsa_switch *ds,int port) {struct vsc73xx *vsc = ds->priv;
include/net/dsa.h +1 -2
@@ -364,8 +364,7 @@ struct dsa_switch_ops {*/ int (*port_enable)(struct dsa_switch *ds,int port,struct phy_device *phy); -void (*port_disable)(struct dsa_switch *ds,int port, -struct phy_device *phy); +void (*port_disable)(struct dsa_switch *ds,int port);/* * Port's MAC EEE settings
net/dsa/dsa_priv.h +1 -1
@@ -143,7 +143,7 @@ static inline struct net_device *dsa_master_find_slave(struct net_device *dev,int dsa_port_set_state (struct dsa_port *dp,u8 state,struct switchdev_trans *trans);int dsa_port_enable (struct dsa_port *dp,struct phy_device *phy); -void dsa_port_disable (struct dsa_port *dp,struct phy_device *phy); +void dsa_port_disable (struct dsa_port *dp);int dsa_port_bridge_join (struct dsa_port *dp,struct net_device *br);void dsa_port_bridge_leave (struct dsa_port *dp,struct net_device *br); int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
net/dsa/port.c +2 -2
@@ -85,7 +85,7 @@ int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy)return 0 ; } -void dsa_port_disable (struct dsa_port *dp,struct phy_device *phy) +void dsa_port_disable (struct dsa_port *dp) {struct dsa_switch *ds = dp->ds;int port = dp->index;
@@ -93,7 +93,7 @@ void dsa_port_disable(struct dsa_port *dp, struct phy_device *phy)dsa_port_set_state_now (dp,BR_STATE_DISABLED );if (ds->ops->port_disable) - ds->ops->port_disable (ds, port, phy); + ds->ops->port_disable (ds, port); }int dsa_port_bridge_join (struct dsa_port *dp,struct net_device *br)
net/dsa/slave.c +1 -1
@@ -122,7 +122,7 @@ static int dsa_slave_close(struct net_device *dev)phylink_stop (dp->pl); -dsa_port_disable (dp, dev->phydev); +dsa_port_disable (dp);dev_mc_unsync (master, dev);dev_uc_unsync (master, dev);
Signature · 1 line
2.20.1
From: Andrew Lunn <[email protected]>
Date: Sun, 24 Feb 2019 20:44:43 +0100
Quoted 4 lines
No current DSA driver makes use of the phydev parameter passed to the
disable_portcall. Remove it.Signed-off-by Andrew Lunn <[email protected]>
Applied to net-next, with some fuzz...