Message ID | 20240729210615.279952-2-paweldembicki@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: vsc73xx: fix MDIO bus access and PHY operations | expand |
On Mon, Jul 29, 2024 at 11:06:07PM +0200, Pawel Dembicki wrote: > According datasheet, VSC73XX family switches supports symmetric and > asymmetric pause and 1000BASE in FD only. > > This patch fix it. > > Fixes: a026809c261b ("net: dsa: vsc73xx: add phylink capabilities") > > Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> No blank line between tags please. Andrew
On Mon, Jul 29, 2024 at 11:06:07PM +0200, Pawel Dembicki wrote: > According datasheet, VSC73XX family switches supports symmetric and > asymmetric pause and 1000BASE in FD only. What about the configuration of the pause? I notice the mac_link_up() method ignores tx_pause/rx_pause, and instead just does this: /* Flow control for the PHY facing ports: * Use a zero delay pause frame when pause condition is left * Obey pause control frames * When generating pause frames, use 0xff as pause value */ vsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port, VSC73XX_FCCONF, VSC73XX_FCCONF_ZERO_PAUSE_EN | VSC73XX_FCCONF_FLOW_CTRL_OBEY | 0xff); which suggests only symmetric pause is supported by the driver _and_ it is always enabled irrespective of what was negotiated. I think this needs to be fixed first, before changing the capabilities.
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index 07b704a1557e..43aeb578d608 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -1491,7 +1491,8 @@ static void vsc73xx_phylink_get_caps(struct dsa_switch *dsa, int port, __set_bit(PHY_INTERFACE_MODE_GMII, interfaces); } - config->mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000; + config->mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | + MAC_10 | MAC_100 | MAC_1000FD; } static int
According datasheet, VSC73XX family switches supports symmetric and asymmetric pause and 1000BASE in FD only. This patch fix it. Fixes: a026809c261b ("net: dsa: vsc73xx: add phylink capabilities") Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> --- drivers/net/dsa/vitesse-vsc73xx-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)