From 4a0eb731d68362169d3d304ffa5afb6972909ab8 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Wed, 1 May 2019 00:08:30 +0200 Subject: [PATCH] net: dsa: mv88e6xxx: Set STP disable state in port_disable When requested to disable a port, set the port STP state to disabled. This fully disables the port and should save some power. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6xxx/chip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 489a899c80b6..dc891d83610e 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -2428,6 +2428,9 @@ static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port) mutex_lock(&chip->reg_lock); + if (mv88e6xxx_port_set_state(chip, port, BR_STATE_DISABLED)) + dev_err(chip->dev, "failed to disable port\n"); + if (chip->info->ops->serdes_irq_free) chip->info->ops->serdes_irq_free(chip, port); -- 2.39.5