Skip to content

Commit 34b5e6a

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6xxx: Configure MAC when using fixed link
The 88e6185 is reporting it has detected a PHY, when a port is connected to an SFP. As a result, the fixed-phy configuration is not being applied. That then breaks packet transfer, since the port is reported as being down. Add additional conditions to check the interface mode, and if it is fixed always configure the port on link up/down, independent of the PPU status. Fixes: 30c4a5b ("net: mv88e6xxx: use resolved link config in mac_link_up()") Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bec8141 commit 34b5e6a

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+3
-2
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
709709
ops = chip->info->ops;
710710

711711
mv88e6xxx_reg_lock(chip);
712-
if (!mv88e6xxx_port_ppu_updates(chip, port) && ops->port_set_link)
712+
if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
713+
mode == MLO_AN_FIXED) && ops->port_set_link)
713714
err = ops->port_set_link(chip, port, LINK_FORCED_DOWN);
714715
mv88e6xxx_reg_unlock(chip);
715716

@@ -731,7 +732,7 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port,
731732
ops = chip->info->ops;
732733

733734
mv88e6xxx_reg_lock(chip);
734-
if (!mv88e6xxx_port_ppu_updates(chip, port)) {
735+
if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) {
735736
/* FIXME: for an automedia port, should we force the link
736737
* down here - what if the link comes up due to "other" media
737738
* while we're bringing the port up, how is the exclusivity

0 commit comments

Comments
 (0)