Re: [PATCH net-next v8 2/3] dpll: zl3073x: add channel ToD, phase step and TIE operations
Ivan Vecera <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.network |
|---|---|
| Message-ID | <[email protected]> |
Sashiko comments with my replies: > Can this loop spin out its retry budget without ever giving the > condition a chance to become true? [...] > On a fast bus where the ToD command completes before the semaphore > is re-read, all 20 iterations can finish well inside the 20 ms window Testing on I2C at both 100 kHz and 400 kHz shows that a single iteration takes approximately 17-19 ms regardless of bus speed. The iteration time is dominated by the device's internal processing of the ToD read commands, not bus transfer time. With 20 retries the budget is 340-380 ms, well beyond the 20 ms margin window. > the kerneldoc for zl3073x_chan_tie_write() states delta_ns "must be > in (-1s, 1s)" and nothing in the function enforces it. [...] > Would an explicit range check on delta_ns be worth adding here? Both in-tree callers already bound the input as you noted. The range guard was intentionally removed in this version at the reviewer's request — the internal API should trust its callers rather than re-validate inputs already checked by the PTP core. The kernel-doc documents the precondition for future callers. Thanks, Ivan