diff options
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.c | 12 | ||||
-rw-r--r-- | net/dsa/port.c | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index ef9bb3974f33..e56d24d5cdde 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -62,6 +62,10 @@ int mv88e6185_port_set_pause(struct mv88e6xxx_chip *chip, int port, else reg &= ~MV88E6XXX_PORT_STS_MY_PAUSE; + if (reg & MV88E6XXX_PORT_MAC_CTL_FORCE_LINK && + reg & MV88E6XXX_PORT_MAC_CTL_LINK_UP) + dev_err(chip->dev, "p%d: %s with port up\n", port, __func__); + return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, reg); } @@ -104,6 +108,10 @@ static int mv88e6xxx_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, return 0; } + if (reg & MV88E6XXX_PORT_MAC_CTL_FORCE_LINK && + reg & MV88E6XXX_PORT_MAC_CTL_LINK_UP) + dev_err(chip->dev, "p%d: %s with port up\n", port, __func__); + err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_MAC_CTL, reg); if (err) return err; @@ -288,6 +296,10 @@ static int mv88e6xxx_port_set_speed_duplex(struct mv88e6xxx_chip *chip, } reg |= ctrl; + if (reg & MV88E6XXX_PORT_MAC_CTL_FORCE_LINK && + reg & MV88E6XXX_PORT_MAC_CTL_LINK_UP) + dev_err(chip->dev, "p%d: %s with port up\n", port, __func__); + err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_MAC_CTL, reg); if (err) return err; diff --git a/net/dsa/port.c b/net/dsa/port.c index 8c52d5a87c17..01478b13c991 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1593,6 +1593,8 @@ static void dsa_port_phylink_mac_config(struct phylink_config *config, if (!ds->ops->phylink_mac_config) return; + dev_printk(KERN_DEBUG, ds->dev, "p%d: %s()\n", dp->index, __func__); + ds->ops->phylink_mac_config(ds, dp->index, mode, state); } @@ -1619,6 +1621,8 @@ static void dsa_port_phylink_mac_link_down(struct phylink_config *config, struct phy_device *phydev = NULL; struct dsa_switch *ds = dp->ds; + dev_printk(KERN_DEBUG, ds->dev, "p%d: %s()\n", dp->index, __func__); + if (dsa_port_is_user(dp)) phydev = dp->user->phydev; @@ -1641,6 +1645,8 @@ static void dsa_port_phylink_mac_link_up(struct phylink_config *config, struct dsa_port *dp = container_of(config, struct dsa_port, pl_config); struct dsa_switch *ds = dp->ds; + dev_printk(KERN_DEBUG, ds->dev, "p%d: %s()\n", dp->index, __func__); + if (!ds->ops->phylink_mac_link_up) { if (ds->ops->adjust_link && phydev) ds->ops->adjust_link(ds, dp->index, phydev); |