[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190817191452.16716-4-marek.behun@nic.cz>
Date: Sat, 17 Aug 2019 21:14:51 +0200
From: Marek Behún <marek.behun@....cz>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Marek Behún <marek.behun@....cz>
Subject: [PATCH RFC v2 net-next 3/4] net: dsa: mv88e6xxx: check for port type in port_disable
The mv88e6xxx_port_disable method calls mv88e6xxx_port_set_state, which
should be called only for user ports.
Signed-off-by: Marek Behún <marek.behun@....cz>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: Vladimir Oltean <olteanv@...il.com>
Cc: Vivien Didelot <vivien.didelot@...il.com>
---
drivers/net/dsa/mv88e6xxx/chip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 9b3ad22a5b98..ad27f2fc5c33 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2285,8 +2285,9 @@ static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port)
mv88e6xxx_reg_lock(chip);
- if (mv88e6xxx_port_set_state(chip, port, BR_STATE_DISABLED))
- dev_err(chip->dev, "failed to disable port\n");
+ if (dsa_is_user_port(ds, port))
+ 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.21.0
Powered by blists - more mailing lists