diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-02-14 13:32:36 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-05-09 18:17:43 +0100 |
commit | 49328d1e23d44da552dd49a703c750bbef59296b (patch) | |
tree | 608fb0e3e1db2c63ecf2630870a4b289fd44ef00 | |
parent | 7053e98203633c9790441e048c448873da84e39d (diff) |
net: dsa: debugging printszii
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-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 f37389b58c95..f44b7d8c80fe 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1574,6 +1574,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); } @@ -1599,6 +1601,8 @@ static void dsa_port_phylink_mac_link_down(struct phylink_config *config, struct dsa_port *dp = dsa_phylink_to_port(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_down) return; @@ -1615,6 +1619,8 @@ static void dsa_port_phylink_mac_link_up(struct phylink_config *config, struct dsa_port *dp = dsa_phylink_to_port(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) return; |