Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 30c4a5b0aad8 ("net: mv88e6xxx: use resolved link config in mac_link_up()")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrew Lunn and committed by
David S. Miller
34b5e6a3 bec8141a

+3 -2
+3 -2
drivers/net/dsa/mv88e6xxx/chip.c
··· 709 709 ops = chip->info->ops; 710 710 711 711 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) 713 714 err = ops->port_set_link(chip, port, LINK_FORCED_DOWN); 714 715 mv88e6xxx_reg_unlock(chip); 715 716 ··· 732 731 ops = chip->info->ops; 733 732 734 733 mv88e6xxx_reg_lock(chip); 735 - if (!mv88e6xxx_port_ppu_updates(chip, port)) { 734 + if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) { 736 735 /* FIXME: for an automedia port, should we force the link 737 736 * down here - what if the link comes up due to "other" media 738 737 * while we're bringing the port up, how is the exclusivity