1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa/microchip
Oleksij Rempel 2f58148c41 net: dsa: microchip: ksz8: Add function to configure ports with integrated PHYs
This patch introduces the function 'ksz8_phy_port_link_up' to the
Microchip KSZ8xxx driver. This function is responsible for setting up
flow control and duplex settings for the ports that are integrated with
PHYs.

The KSZ8795 switch supports asymmetric pause control, which can't be
fully utilized since a single bit controls both RX and TX pause. Despite
this, the flow control can be adjusted based on the auto-negotiation
process, taking into account the capabilities of both link partners.

On the other hand, the KSZ8873's PORT_FORCE_FLOW_CTRL bit can be set by
the hardware bootstrap, which ignores the auto-negotiation result.
Therefore, even in auto-negotiation mode, we need to ensure that this
bit is correctly set.

When auto-negotiation isn't in use, we enforce symmetric pause control
for the KSZ8795 switch.

Please note, forcing flow control disable on a port while still
advertising pause support isn't possible. While this scenario
might not be practical or desired, it's important to be aware of this
limitation when working with the KSZ8873 and similar devices.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20231127145101.3039399-3-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-11-29 08:38:34 -08:00
..
Kconfig net: dsa: microchip: ptp: fix up PTP dependency 2023-01-31 13:21:38 +01:00
ksz8.h net: dsa: microchip: ksz8: Make flow control, speed, and duplex on CPU port configurable 2023-11-29 08:38:34 -08:00
ksz8795.c net: dsa: microchip: ksz8: Add function to configure ports with integrated PHYs 2023-11-29 08:38:34 -08:00
ksz8795_reg.h net: dsa: microchip: move REG_SW_MAC_ADDR to dev->info->regs[] 2023-10-03 13:51:02 +02:00
ksz8863_smi.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
ksz9477.c net: dsa: microchip: ksz9477: Fix spelling mistake "Enery" -> "Energy" 2023-10-27 14:45:50 -07:00
ksz9477.h net: dsa: microchip: Ensure Stable PME Pin State for Wake-on-LAN 2023-10-27 14:43:53 -07:00
ksz9477_acl.c net: dsa: microchip: Fix uninitialized var in ksz9477_acl_move_entries() 2023-10-10 11:12:01 +02:00
ksz9477_i2c.c net: dsa: microchip: Refactor switch shutdown routine for WoL preparation 2023-10-27 14:43:53 -07:00
ksz9477_reg.h net: dsa: microchip: move REG_SW_MAC_ADDR to dev->info->regs[] 2023-10-03 13:51:02 +02:00
ksz9477_tc_flower.c net: dsa: microchip: Add partial ACL support for ksz9477 switches 2023-09-17 14:28:34 +01:00
ksz_common.c net: dsa: microchip: ksz8: Add function to configure ports with integrated PHYs 2023-11-29 08:38:34 -08:00
ksz_common.h net: dsa: microchip: ksz8: Add function to configure ports with integrated PHYs 2023-11-29 08:38:34 -08:00
ksz_ptp.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
ksz_ptp.h net: dsa: microchip: ptp: add support for perout programmable pins 2023-01-13 08:40:41 +00:00
ksz_ptp_reg.h net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pins 2023-01-13 08:40:41 +00:00
ksz_spi.c net: dsa: microchip: Refactor switch shutdown routine for WoL preparation 2023-10-27 14:43:53 -07:00
lan937x.h net: dsa: microchip: add support for credit based shaper 2023-01-23 22:12:35 -08:00
lan937x_main.c net: dsa: microchip: add an enum for regmap widths 2023-05-30 09:48:17 +02:00
lan937x_reg.h net: dsa: microchip: add support for credit based shaper 2023-01-23 22:12:35 -08:00
Makefile net: dsa: microchip: Add partial ACL support for ksz9477 switches 2023-09-17 14:28:34 +01:00