lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 19 Oct 2020 15:43:53 +1300 From: Chris Packham <chris.packham@...iedtelesis.co.nz> To: andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com, olteanv@...il.com, davem@...emloft.net, kuba@...nel.org, linux@...linux.org.uk Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Chris Packham <chris.packham@...iedtelesis.co.nz> Subject: [PATCH v2 1/3] net: dsa: mv88e6xxx: Don't force link when using in-band-status When a port is configured with 'managed = "in-band-status"' don't force the link up, the switch MAC will detect the link status correctly. Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz> Reviewed-by: Andrew Lunn <andrew@...n.ch> --- Changes in v2: - Add review from Andrew drivers/net/dsa/mv88e6xxx/chip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index f0dbc05e30a4..1ef392ee52c5 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -767,8 +767,11 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port, goto error; } - if (ops->port_set_link) - err = ops->port_set_link(chip, port, LINK_FORCED_UP); + if (ops->port_set_link) { + int link = mode == MLO_AN_INBAND ? LINK_UNFORCED : LINK_FORCED_UP; + + err = ops->port_set_link(chip, port, link); + } } error: mv88e6xxx_reg_unlock(chip); -- 2.28.0
Powered by blists - more mailing lists