> A driver can do hardware timestamping without a PTP hardware clock; its
> get_ts_info() then reports hardware timestamping with phc_index -1.
> ngbe and txgbe (libwx) do so when no PTP clock is registered, e.g. with
> CONFIG_PTP_1588_CLOCK=n, and dpaa without a ptimer-handle.
> 
> SIOCGHWTSTAMP and SIOCSHWTSTAMP work for such a device, but
> tsconfig_prepare_data() refuses it with -ENODEV:
> 
>  - TSCONFIG_GET fails.
>  - TSCONFIG_SET passes the new config to ndo_hwtstamp_set() first and
>    fails only when building the reply, so user space gets an error
>    although the config was applied.
>  - In a dump only -EOPNOTSUPP is skipped; the error ends the dump, and
>    the devices after this one are not listed.
> 
> The reply already leaves out ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER when
> the index is -1. Let tsconfig_prepare_data() take that path instead of
> failing.
> 
> Fixes: 6e9e2eed4f39 ("net: ethtool: Add support for tsconfig command to 
> get/set hwtstamp config")
> 
> Signed-off-by: Steffen Trumtrar <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/20261112-v6-7-topic-virtio-net-ptp-v5-0-7ab67b572...@pengutronix.de?part=1


Reply via email to