From: Vivien Didelot Date: Thu, 26 Oct 2017 15:22:52 +0000 (-0400) Subject: net: dsa: mv88e6xxx: skip unused ports X-Git-Tag: v5.15~9988^2~280^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91dee144817e51bbfbdc06af4dc1acce6e92bdda;p=platform%2Fkernel%2Flinux-starfive.git net: dsa: mv88e6xxx: skip unused ports The unused ports are currently configured in normal mode. This does not prevent the switch from being functional, but it is unnecessary. Skip unused ports. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 677d690..2d8cf66 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -2005,6 +2005,9 @@ static int mv88e6xxx_setup(struct dsa_switch *ds) /* Setup Switch Port Registers */ for (i = 0; i < mv88e6xxx_num_ports(chip); i++) { + if (dsa_is_unused_port(ds, i)) + continue; + err = mv88e6xxx_setup_port(chip, i); if (err) goto unlock;