From eea7cb00b2e657445de9913736ff38b99ed0f9a5 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Thu, 16 Jan 2025 12:35:12 +0100
Subject: [PATCH 25/27] net: dsa: mv88e6xxx: collapse disabled state into
 blocking
Organization: Wires

This patch changes the behavior of switchcore ports wrt. the port state.
Instead of disabling the port, the driver now treats the disabled state
the same as the blocking and listening state.

On this particular type of device the disabled state means no traffic is
passed in or out.  This interferes with protocols that perform any type
of link qualification.  E.g., an LACP link aggregate (bond) used as a
bridge port with member ports from an mv88e6xxx switch core.  Without
this patch, the bond is set to 'state disabled'. which is offloaded to
each member port, preventing LACPDUs from passing through to qualify the
link and become active.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
 drivers/net/dsa/mv88e6xxx/port.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index 84900814c456..91e58297594c 100644
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -791,8 +791,6 @@ int mv88e6xxx_port_set_state(struct mv88e6xxx_chip *chip, int port, u8 state)
 
 	switch (state) {
 	case BR_STATE_DISABLED:
-		state = MV88E6XXX_PORT_CTL0_STATE_DISABLED;
-		break;
 	case BR_STATE_BLOCKING:
 	case BR_STATE_LISTENING:
 		state = MV88E6XXX_PORT_CTL0_STATE_BLOCKING;
