All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0
@ 2019-05-31  7:35 Nikita Yushchenko
  2019-05-31 14:31 ` Vivien Didelot
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Nikita Yushchenko @ 2019-05-31  7:35 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli
  Cc: David S. Miller, Heiner Kallweit, Marek Behún, Russell King,
	netdev, linux-kernel, Chris Healy, Nikita Yushchenko

When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error
message is logged:

failed to kill vid 0081/0 for device eth_cu_1000_4

This is caused by call from __vlan_vid_del() with vin set to zero, over
call chain this results into _mv88e6xxx_port_vlan_del() called with
vid=0, and mv88e6xxx_vtu_get() called from there returns -EINVAL.

On symmetric path moving port up, call goes through
mv88e6xxx_port_vlan_prepare() that calls mv88e6xxx_port_check_hw_vlan()
that returns -EOPNOTSUPP for zero vid.

This patch changes mv88e6xxx_vtu_get() to also return -EOPNOTSUPP for
zero vid, then this error code is explicitly cleared in
dsa_slave_vlan_rx_kill_vid() and error message is no longer logged.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 28414db979b0..6b77fde5f0e4 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1392,7 +1392,7 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid,
 	int err;
 
 	if (!vid)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	entry->vid = vid - 1;
 	entry->valid = false;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0
@ 2019-05-31  7:27 Nikita Yushchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Nikita Yushchenko @ 2019-05-31  7:27 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli
  Cc: David S. Miller, Heiner Kallweit, Marek Behún, Russell King,
	netdev, linux-kernel, Chris Healy, Nikita Yushchenko

When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error
message is logged:

failed to kill vid 0081/0 for device eth_cu_1000_4

This is caused by call from __vlan_vid_del() with vin set to zero, over
call chain this results into _mv88e6xxx_port_vlan_del() called with
vid=0, and mv88e6xxx_vtu_get() called from there returns -EINVAL.

On symmetric path moving port up, call goes through
mv88e6xxx_port_vlan_prepare() that calls mv88e6xxx_port_check_hw_vlan()
that returns -EOPNOTSUPP for zero vid.

This patch changes mv88e6xxx_vtu_get() to also return -EOPNOTSUPP for
zero vid, then this error code is explicitly cleared in
dsa_slave_vlan_rx_kill_vid() and error message is no longer logged.
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 28414db979b0..6b77fde5f0e4 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1392,7 +1392,7 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid,
 	int err;
 
 	if (!vid)
-		return -EINVAL;
+		return -EOPNOTSUPP;
 
 	entry->vid = vid - 1;
 	entry->valid = false;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-06-02 20:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31  7:35 [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Nikita Yushchenko
2019-05-31 14:31 ` Vivien Didelot
2019-05-31 14:37   ` Andrew Lunn
2019-05-31 14:46     ` Nikita Yushchenko
2019-05-31 15:00       ` Vivien Didelot
2019-05-31 15:02         ` Nikita Yushchenko
2019-05-31 16:36         ` Florian Fainelli
2019-05-31 18:19           ` Vivien Didelot
2019-05-31 19:33             ` Florian Fainelli
2019-05-31 16:34     ` Florian Fainelli
2019-05-31 20:14       ` Vivien Didelot
2019-05-31 16:44   ` Florian Fainelli
2019-05-31 20:15 ` Vivien Didelot
2019-06-02 20:54 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-05-31  7:27 Nikita Yushchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.