Skip to content

Commit

Permalink
net: dsa: mv88e6xxx: skip unused ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Oct 27, 2017
1 parent bff7b68 commit 91dee14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/mv88e6xxx/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91dee14

Please sign in to comment.