diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2018-04-27 03:56:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-30 02:36:49 +0200 |
commit | b28f872dc48a4d55cba9d51cf3bac03ca32b2747 (patch) | |
tree | e0eb188210daa8319673359db996c11d7052f3d5 /drivers/net/dsa/mv88e6xxx/global2.c | |
parent | net: phy: Fix modular PHYLIB build (diff) | |
download | linux-b28f872dc48a4d55cba9d51cf3bac03ca32b2747.tar.xz linux-b28f872dc48a4d55cba9d51cf3bac03ca32b2747.zip |
net: dsa: mv88e6xxx: move trunk setup
Move the trunking setup out of Global 2 specific setup into the top
level mv88e6xxx_setup function.
Note that the 88E6390 family calls this LAG instead of Trunk and
supports 32 possible ID routing vectors, with LAG ID bit 4 being placed
in Global 2 register 0x1D...
We don't need Trunk (or LAG) IDs for the moment, thus keep it simple.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/global2.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global2.c b/drivers/net/dsa/mv88e6xxx/global2.c index 0ce627fded48..3f24763aedc5 100644 --- a/drivers/net/dsa/mv88e6xxx/global2.c +++ b/drivers/net/dsa/mv88e6xxx/global2.c @@ -174,7 +174,7 @@ static int mv88e6xxx_g2_trunk_mapping_write(struct mv88e6xxx_chip *chip, int id, return mv88e6xxx_g2_update(chip, MV88E6XXX_G2_TRUNK_MAPPING, val); } -static int mv88e6xxx_g2_clear_trunk(struct mv88e6xxx_chip *chip) +int mv88e6xxx_g2_trunk_clear(struct mv88e6xxx_chip *chip) { const u16 port_mask = BIT(mv88e6xxx_num_ports(chip)) - 1; int i, err; @@ -1159,10 +1159,5 @@ int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip) if (err) return err; - /* Clear all trunk masks and mapping. */ - err = mv88e6xxx_g2_clear_trunk(chip); - if (err) - return err; - return 0; } |