Skip to content

Commit d00bdc0

Browse files
vladimirolteandavem330
authored andcommitted
net: dsa: sja1105: Remove restriction of zero base-time for taprio offload
The check originates from the initial implementation which was not based on PTP time but on a standalone clock source. In the meantime we can now program the PTPSCHTM register at runtime with the dynamic base time (actually with a value that is 200 ns smaller, to avoid writing DELTA=0 in the Schedule Entry Points Parameters Table). And we also have logic for moving the actual base time in the future of the PHC's current time base, so the check for zero serves no purpose, since even if the user will specify zero, that's not what will end up in the static config table where the limitation is. Fixes: 86db36a ("net: dsa: sja1105: Implement state machine for TAS with PTP clock source") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5a47f58 commit d00bdc0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/net/dsa/sja1105/sja1105_tas.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,6 @@ int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
477477
if (admin->cycle_time_extension)
478478
return -ENOTSUPP;
479479

480-
if (!ns_to_sja1105_delta(admin->base_time)) {
481-
dev_err(ds->dev, "A base time of zero is not hardware-allowed\n");
482-
return -ERANGE;
483-
}
484-
485480
for (i = 0; i < admin->num_entries; i++) {
486481
s64 delta_ns = admin->entries[i].interval;
487482
s64 delta_cycles = ns_to_sja1105_delta(delta_ns);

0 commit comments

Comments
 (0)