[PATCH net] net: sparx5/lan969x: only check the DSM calendar on sparx5
Daniel Machon
daniel.machon at microchip.com
Mon Nov 23 07:01:29 PST 2026
sparx5_config_dsm_calendar() calculates the DSM calendar of each taxi
and checks it with sparx5_dsm_calendar_check(), which compares the slot
distances of each device against data->avg_dist[]. Only
sparx5_dsm_calendar_calc() fills in avg_dist[].
Before this patch, the check also runs on lan969x, where avg_dist[]
stays 0. Any device with two or more slots, e.g. a 10G port sharing a
taxi with four 1G ports, fails the check, and the switch fails to probe.
Run the check only on sparx5, as the lan969x calculation computes no
distance limits to check against.
Reported by a customer, and reproduced by running the lan969x calendar
calculation and the check in a userspace harness.
Fixes: 5d2ba3941016 ("net: lan969x: add function for calculating the DSM calendar")
Signed-off-by: Daniel Machon <daniel.machon at microchip.com>
---
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c b/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
index 35815fb58080f..b0ac91bffa874 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
@@ -595,10 +595,13 @@ static int sparx5_config_dsm_calendar(struct sparx5 *sparx5)
dev_err(sparx5->dev, "DSM calendar calculation failed\n");
goto cal_out;
}
- err = sparx5_dsm_calendar_check(sparx5, data);
- if (err) {
- dev_err(sparx5->dev, "DSM calendar check failed\n");
- goto cal_out;
+ if (is_sparx5(sparx5)) {
+ err = sparx5_dsm_calendar_check(sparx5, data);
+ if (err) {
+ dev_err(sparx5->dev,
+ "DSM calendar check failed\n");
+ goto cal_out;
+ }
}
err = sparx5_dsm_calendar_update(sparx5, taxi, data);
if (err) {
---
base-commit: af6737b9066832a2017c281159950ba92385ce00
change-id: 20261123-lan969x-dsm-calendar-check-b8a237dd0cab
Best regards,
--
Daniel Machon <daniel.machon at microchip.com>
More information about the linux-arm-kernel
mailing list