Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: sparx5/lan969x: only check the DSM calendar on sparx5
@ 2026-11-23 15:01 Daniel Machon
  2026-11-27 10:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Machon @ 2026-11-23 15:01 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Steen Hegelund, UNGLinuxDriver
  Cc: netdev, linux-arm-kernel

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@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@microchip.com>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-27 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 15:01 [PATCH net] net: sparx5/lan969x: only check the DSM calendar on sparx5 Daniel Machon
2026-11-27 10:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox