diff options
author | Luiz Souza <luiz@netgate.com> | 2018-03-20 19:28:54 -0500 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-03-20 19:31:06 -0500 |
commit | 29eeecb98efaf5a1587c205b690ef49d90a5d29d (patch) | |
tree | 955f350ef3f8dcfcc86ede22b67ac78f80b4c165 /sys | |
parent | 25f6658b3310f47d3569f9c3aeb7126ee64d6e45 (diff) | |
download | FreeBSD-src-29eeecb98efaf5a1587c205b690ef49d90a5d29d.zip FreeBSD-src-29eeecb98efaf5a1587c205b690ef49d90a5d29d.tar.gz |
Really disable LAG on all ports at resetlagg().
(cherry picked from commit 4d28ab726268059f99263d97b2aaa2dafce4a33d)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/etherswitch/e6000sw/e6000sw.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c index f13471f..2739dd9 100644 --- a/sys/dev/etherswitch/e6000sw/e6000sw.c +++ b/sys/dev/etherswitch/e6000sw/e6000sw.c @@ -1417,7 +1417,21 @@ static int e6000sw_resetlagg(e6000sw_softc_t *sc) { int i; + uint32_t reg; + for (i = 0; i < sc->num_ports; i++) { + if (!e6000sw_is_portenabled(sc, i)) + continue; + reg = e6000sw_readreg(sc, REG_PORT(sc, i), PORT_CONTROL1); + if (reg & PORT_CONTROL1_LAG_PORT) { + /* Disable LAG on port. */ + reg &= ~PORT_CONTROL1_LAG_PORT; + reg &= ~(PORT_CONTROL1_LAG_ID_MASK << + PORT_CONTROL1_LAG_ID_SHIFT); + e6000sw_writereg(sc, REG_PORT(sc, i), + PORT_CONTROL1, reg); + } + } for (i = 0; i < sc->num_laggs; i++) e6000sw_writereg(sc, REG_GLOBAL2, LAG_MAPPING, i << LAGID_SHIFT | LAG_UPDATE); |