Commit 7fb5a711 authored by Hubert Feurstein's avatar Hubert Feurstein Committed by David S. Miller

net: dsa: mv88e6xxx: drop adjust_link to enabled phylink

We have to drop the adjust_link callback in order to finally migrate to
phylink.

Otherwise we get the following warning during startup:
  "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please
   migrate to PHYLINK!"

The warning is generated in the function dsa_port_link_register_of in
dsa/port.c:

  int dsa_port_link_register_of(struct dsa_port *dp)
  {
  	struct dsa_switch *ds = dp->ds;

  	if (!ds->ops->adjust_link)
  		return dsa_port_phylink_register(dp);

  	dev_warn(ds->dev,
  		 "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");
  	[...]
  }
Signed-off-by: default avatarHubert Feurstein <h.feurstein@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3953a3c
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <linux/platform_data/mv88e6xxx.h> #include <linux/platform_data/mv88e6xxx.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/phy.h>
#include <linux/phylink.h> #include <linux/phylink.h>
#include <net/dsa.h> #include <net/dsa.h>
...@@ -482,30 +481,6 @@ static int mv88e6xxx_phy_is_internal(struct dsa_switch *ds, int port) ...@@ -482,30 +481,6 @@ static int mv88e6xxx_phy_is_internal(struct dsa_switch *ds, int port)
return port < chip->info->num_internal_phys; return port < chip->info->num_internal_phys;
} }
/* We expect the switch to perform auto negotiation if there is a real
* phy. However, in the case of a fixed link phy, we force the port
* settings from the fixed link settings.
*/
static void mv88e6xxx_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev)
{
struct mv88e6xxx_chip *chip = ds->priv;
int err;
if (!phy_is_pseudo_fixed_link(phydev) &&
mv88e6xxx_phy_is_internal(ds, port))
return;
mv88e6xxx_reg_lock(chip);
err = mv88e6xxx_port_setup_mac(chip, port, phydev->link, phydev->speed,
phydev->duplex, phydev->pause,
phydev->interface);
mv88e6xxx_reg_unlock(chip);
if (err && err != -EOPNOTSUPP)
dev_err(ds->dev, "p%d: failed to configure MAC\n", port);
}
static void mv88e6065_phylink_validate(struct mv88e6xxx_chip *chip, int port, static void mv88e6065_phylink_validate(struct mv88e6xxx_chip *chip, int port,
unsigned long *mask, unsigned long *mask,
struct phylink_link_state *state) struct phylink_link_state *state)
...@@ -4639,7 +4614,6 @@ static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port, ...@@ -4639,7 +4614,6 @@ static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
static const struct dsa_switch_ops mv88e6xxx_switch_ops = { static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
.get_tag_protocol = mv88e6xxx_get_tag_protocol, .get_tag_protocol = mv88e6xxx_get_tag_protocol,
.setup = mv88e6xxx_setup, .setup = mv88e6xxx_setup,
.adjust_link = mv88e6xxx_adjust_link,
.phylink_validate = mv88e6xxx_validate, .phylink_validate = mv88e6xxx_validate,
.phylink_mac_link_state = mv88e6xxx_link_state, .phylink_mac_link_state = mv88e6xxx_link_state,
.phylink_mac_config = mv88e6xxx_mac_config, .phylink_mac_config = mv88e6xxx_mac_config,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment