net: phylink: add rxc_always_on flag to phylink_pcs
authorRomain Gantois <romain.gantois@bootlin.com>
Tue, 26 Mar 2024 13:32:08 +0000 (14:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 02:21:33 +0000 (19:21 -0700)
commitdceb393a0a8e82ff05b7c1f6c911d0779d856a7a
tree92ac1d75f76ae6a5f200eece24c8f0ae71c67374
parent21d9ba5bc5516e1d8a90c4a26de90855a1e4fb59
net: phylink: add rxc_always_on flag to phylink_pcs

Some MAC drivers (e.g. stmmac) require a continuous receive clock signal to
be generated by a PCS that is handled by a standalone PCS driver.

Such a PCS driver does not have access to a PHY device, thus cannot check
the PHY_F_RXC_ALWAYS_ON flag. They cannot check max_requires_rxc in the
phylink config either, since it is a private member. Therefore, a new flag
is needed to signal to the PCS that it should keep the RX clock signal up
at all times.

Co-developed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240326-rxc_bugfix-v6-2-24a74e5c761f@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c
include/linux/phylink.h