]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: fix preparation of a port STP update
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 29 Sep 2015 16:38:36 +0000 (12:38 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2015 04:35:06 +0000 (21:35 -0700)
commitbde38fa88073a70391e589e29f3fd0d7b2c8f28f
tree9a40533604c7b4287c57d02ad67a26f431de63c3
parentc5966d63d25191a04bc8530ad0e4490c48a87f6e
net: dsa: fix preparation of a port STP update

Because of the default 0 value of ret in dsa_slave_port_attr_set, a
driver may return -EOPNOTSUPP from the commit phase of a STP state,
which triggers a WARN() from switchdev.

This happened on a 6185 switch which does not support hardware bridging.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c