From: Greg Kroah-Hartman Date: Mon, 18 Oct 2021 13:03:32 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.14.252~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed3d9e5d221434c7ae0a049133ccece007fe4cce;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: net-dsa-mv88e6xxx-don-t-use-phy_detect-on-internal-phy-s.patch --- diff --git a/queue-5.10/net-dsa-mv88e6xxx-don-t-use-phy_detect-on-internal-phy-s.patch b/queue-5.10/net-dsa-mv88e6xxx-don-t-use-phy_detect-on-internal-phy-s.patch new file mode 100644 index 00000000000..b84b9c69c32 --- /dev/null +++ b/queue-5.10/net-dsa-mv88e6xxx-don-t-use-phy_detect-on-internal-phy-s.patch @@ -0,0 +1,59 @@ +From 4a3e0aeddf091f00974b02627c157843ce382a24 Mon Sep 17 00:00:00 2001 +From: Maarten Zanders +Date: Mon, 11 Oct 2021 16:27:20 +0200 +Subject: net: dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's + +From: Maarten Zanders + +commit 4a3e0aeddf091f00974b02627c157843ce382a24 upstream. + +mv88e6xxx_port_ppu_updates() interpretes data in the PORT_STS +register incorrectly for internal ports (ie no PPU). In these +cases, the PHY_DETECT bit indicates link status. This results +in forcing the MAC state whenever the PHY link goes down which +is not intended. As a side effect, LED's configured to show +link status stay lit even though the physical link is down. + +Add a check in mac_link_down and mac_link_up to see if it +concerns an external port and only then, look at PPU status. + +Fixes: 5d5b231da7ac (net: dsa: mv88e6xxx: use PHY_DETECT in mac_link_up/mac_link_down) +Reported-by: Maarten Zanders +Reviewed-by: Maxime Chevallier +Signed-off-by: Maarten Zanders +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -726,7 +726,11 @@ static void mv88e6xxx_mac_link_down(stru + ops = chip->info->ops; + + mv88e6xxx_reg_lock(chip); +- if ((!mv88e6xxx_port_ppu_updates(chip, port) || ++ /* Internal PHYs propagate their configuration directly to the MAC. ++ * External PHYs depend on whether the PPU is enabled for this port. ++ */ ++ if (((!mv88e6xxx_phy_is_internal(ds, port) && ++ !mv88e6xxx_port_ppu_updates(chip, port)) || + mode == MLO_AN_FIXED) && ops->port_set_link) + err = ops->port_set_link(chip, port, LINK_FORCED_DOWN); + mv88e6xxx_reg_unlock(chip); +@@ -749,7 +753,12 @@ static void mv88e6xxx_mac_link_up(struct + ops = chip->info->ops; + + mv88e6xxx_reg_lock(chip); +- if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) { ++ /* Internal PHYs propagate their configuration directly to the MAC. ++ * External PHYs depend on whether the PPU is enabled for this port. ++ */ ++ if ((!mv88e6xxx_phy_is_internal(ds, port) && ++ !mv88e6xxx_port_ppu_updates(chip, port)) || ++ mode == MLO_AN_FIXED) { + /* FIXME: for an automedia port, should we force the link + * down here - what if the link comes up due to "other" media + * while we're bringing the port up, how is the exclusivity diff --git a/queue-5.10/series b/queue-5.10/series index 3a127b1b07a..0a95da08b86 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -100,3 +100,4 @@ r8152-select-crc32-and-crypto-crypto_hash-crypto_sha256.patch nfp-flow_offload-move-flow_indr_dev_register-from-app-init-to-app-start.patch net-mscc-ocelot-warn-when-a-ptp-irq-is-raised-for-an-unknown-skb.patch ionic-don-t-remove-netdev-dev_addr-when-syncing-uc-list.patch +net-dsa-mv88e6xxx-don-t-use-phy_detect-on-internal-phy-s.patch