summaryrefslogtreecommitdiff
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-10-26 11:22:52 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-28 00:00:09 +0900
commit91dee144817e51bbfbdc06af4dc1acce6e92bdda (patch)
treee1f81c393307d9868518bd84f3d803bb6e837d1a /drivers/net/dsa
parentbff7b688d5b10a8cb8cecefdea5e255408b78f2f (diff)
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 <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 677d6902807e..2d8cf66e8f74 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;