linux/drivers/net/dsa
Martin Whitaker 242665bd91 net: dsa: microchip: fix PTP config failure when using multiple ports
commit 6efea51354 upstream.

When performing the port_hwtstamp_set operation, ptp_schedule_worker()
will be called if hardware timestamoing is enabled on any of the ports.
When using multiple ports for PTP, port_hwtstamp_set is executed for
each port. When called for the first time ptp_schedule_worker() returns
0. On subsequent calls it returns 1, indicating the worker is already
scheduled. Currently the ksz driver treats 1 as an error and fails to
complete the port_hwtstamp_set operation, thus leaving the timestamping
configuration for those ports unchanged.

This patch fixes this by ignoring the ptp_schedule_worker() return
value.

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/7aae307a-35ca-4209-a850-7b2749d40f90@martin-whitaker.me.uk
Fixes: bb01ad3057 ("net: dsa: microchip: ptp: manipulating absolute time using ptp hw clock")
Signed-off-by: Martin Whitaker <foss@martin-whitaker.me.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Link: https://patch.msgid.link/20240817094141.3332-1-foss@martin-whitaker.me.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-08-29 17:33:53 +02:00
..
b53 net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports 2024-08-03 08:54:05 +02:00
hirschmann net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
microchip net: dsa: microchip: fix PTP config failure when using multiple ports 2024-08-29 17:33:53 +02:00
mv88e6xxx net: dsa: mv88e6xxx: Fix out-of-bound access 2024-08-29 17:33:48 +02:00
ocelot net: mscc: ocelot: serialize access to the injection/extraction groups 2024-08-29 17:33:45 +02:00
qca net dsa: qca8k: fix usages of device_get_named_child_node() 2024-06-21 14:38:33 +02:00
realtek net: dsa: realtek: keep default LED state in rtl8366rb 2024-06-27 13:49:02 +02:00
sja1105 net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45() 2024-04-10 16:35:51 +02:00
xrs700x net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
bcm_sf2.c net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() 2024-08-14 13:58:40 +02:00
bcm_sf2.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2_cfp.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa_loop_bdinfo.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Kconfig net: dsa: mt7530: improve and relax PHY driver dependency 2023-08-09 11:22:55 +01:00
lan9303-core.c dsa: lan9303: Fix mapping between DSA port number and PHY address 2024-07-18 13:21:11 +02:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: dsa: Switch i2c drivers back to use .probe() 2023-05-31 09:52:55 +01:00
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-28 17:20:11 +00:00
lantiq_gswip.c net: dsa: lantiq_gswip: mark OF related data as maybe unused 2023-03-15 08:11:01 +00:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530: fix support for MT7531BE 2023-04-19 17:37:45 -07:00
mt7530-mmio.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
mt7530.c net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards 2024-04-27 17:11:43 +02:00
mt7530.h net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards 2024-04-27 17:11:43 +02:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: rzn1-a5psw: remove redundant logs 2023-08-23 09:43:32 +01:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: check busy flag in MDIO operations 2024-08-29 17:33:18 +02:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xxx: Make vsc73xx_remove() return void 2021-11-15 13:15:07 +00:00