Message ID | E1nNbgn-00Akik-MJ@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: ocelot: phylink updates | expand |
On Fri, Feb 25, 2022 at 02:35:21PM +0000, Russell King (Oracle) wrote: > When the supported interfaces bitmap is populated, phylink will itself > check that the interface mode is present in this bitmap. Drivers no > longer need to perform this check themselves. Remove these checks. > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Sorry, just realised I should've deleted "ocelot_port" here as well, for some reason my build testing didn't find that. Please assume that I've deleted it (I've updated the patch locally.) Thanks. > --- > drivers/net/dsa/ocelot/felix_vsc9959.c | 6 ------ > drivers/net/dsa/ocelot/seville_vsc9953.c | 6 ------ > 2 files changed, 12 deletions(-) > > diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c > index a1be0e91dde6..4c635c46705e 100644 > --- a/drivers/net/dsa/ocelot/felix_vsc9959.c > +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c > @@ -956,12 +956,6 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port, > struct ocelot_port *ocelot_port = ocelot->ports[port]; > __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; > > - if (state->interface != PHY_INTERFACE_MODE_NA && > - state->interface != ocelot_port->phy_mode) { > - linkmode_zero(supported); > - return; > - } > - > phylink_set_port_modes(mask); > phylink_set(mask, Autoneg); > phylink_set(mask, Pause); > diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c > index 2db51494b1a9..0ae8424c47e2 100644 > --- a/drivers/net/dsa/ocelot/seville_vsc9953.c > +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c > @@ -929,12 +929,6 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port, > struct ocelot_port *ocelot_port = ocelot->ports[port]; > __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; > > - if (state->interface != PHY_INTERFACE_MODE_NA && > - state->interface != ocelot_port->phy_mode) { > - linkmode_zero(supported); > - return; > - } > - > phylink_set_port_modes(mask); > phylink_set(mask, Autoneg); > phylink_set(mask, Pause); > -- > 2.30.2 > >
On Fri, Feb 25, 2022 at 02:35:21PM +0000, Russell King (Oracle) wrote: > When the supported interfaces bitmap is populated, phylink will itself > check that the interface mode is present in this bitmap. Drivers no > longer need to perform this check themselves. Remove these checks. > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> > --- Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> > drivers/net/dsa/ocelot/felix_vsc9959.c | 6 ------ > drivers/net/dsa/ocelot/seville_vsc9953.c | 6 ------ > 2 files changed, 12 deletions(-) > > diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c > index a1be0e91dde6..4c635c46705e 100644 > --- a/drivers/net/dsa/ocelot/felix_vsc9959.c > +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c > @@ -956,12 +956,6 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port, > struct ocelot_port *ocelot_port = ocelot->ports[port]; > __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; > > - if (state->interface != PHY_INTERFACE_MODE_NA && > - state->interface != ocelot_port->phy_mode) { > - linkmode_zero(supported); > - return; > - } > - > phylink_set_port_modes(mask); > phylink_set(mask, Autoneg); > phylink_set(mask, Pause); > diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c > index 2db51494b1a9..0ae8424c47e2 100644 > --- a/drivers/net/dsa/ocelot/seville_vsc9953.c > +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c > @@ -929,12 +929,6 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port, > struct ocelot_port *ocelot_port = ocelot->ports[port]; > __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; > > - if (state->interface != PHY_INTERFACE_MODE_NA && > - state->interface != ocelot_port->phy_mode) { > - linkmode_zero(supported); > - return; > - } > - > phylink_set_port_modes(mask); > phylink_set(mask, Autoneg); > phylink_set(mask, Pause); > -- > 2.30.2 >
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index a1be0e91dde6..4c635c46705e 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -956,12 +956,6 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port, struct ocelot_port *ocelot_port = ocelot->ports[port]; __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; - if (state->interface != PHY_INTERFACE_MODE_NA && - state->interface != ocelot_port->phy_mode) { - linkmode_zero(supported); - return; - } - phylink_set_port_modes(mask); phylink_set(mask, Autoneg); phylink_set(mask, Pause); diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index 2db51494b1a9..0ae8424c47e2 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -929,12 +929,6 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port, struct ocelot_port *ocelot_port = ocelot->ports[port]; __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; - if (state->interface != PHY_INTERFACE_MODE_NA && - state->interface != ocelot_port->phy_mode) { - linkmode_zero(supported); - return; - } - phylink_set_port_modes(mask); phylink_set(mask, Autoneg); phylink_set(mask, Pause);
When the supported interfaces bitmap is populated, phylink will itself check that the interface mode is present in this bitmap. Drivers no longer need to perform this check themselves. Remove these checks. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/net/dsa/ocelot/felix_vsc9959.c | 6 ------ drivers/net/dsa/ocelot/seville_vsc9953.c | 6 ------ 2 files changed, 12 deletions(-)