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 <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn 2019-05-01 00:08:30 +02:00 committed by David S. Miller
parent 2ce1aef9cd
commit 4a0eb731d6
1 changed files with 3 additions and 0 deletions

View File

@ -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);