* [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
@ 2025-12-04 12:32 Yao Zi
2025-12-05 22:26 ` Nathan Chancellor
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Yao Zi @ 2025-12-04 12:32 UTC (permalink / raw)
To: Miri Korenblit, Richard Cochran, Johannes Berg, Anjaneyulu,
Daniel Gabay
Cc: linux-wireless, linux-kernel, netdev, Mingcong Bai, Kexy Biscuit,
Yao Zi, Nathan Chancellor
Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
required ops are NULL"), PTP clock registered through ptp_clock_register
is required to have ptp_clock_info.settime64 set, however, neither MVM
nor MLD's PTP clock implementation sets it, resulting in warnings when
the interface starts up, like
WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
I don't find an appropriate firmware interface to implement settime64()
for iwlwifi MLD/MVM, thus instead create a stub that returns
-EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
be registered.
Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
drivers/net/wireless/intel/iwlwifi/mld/ptp.c | 7 +++++++
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
index ffeb37a7f830..231920425c06 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
@@ -121,6 +121,12 @@ static int iwl_mld_ptp_gettime(struct ptp_clock_info *ptp,
return 0;
}
+static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
+ const struct timespec64 *ts)
+{
+ return -EOPNOTSUPP;
+}
+
static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{
struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
@@ -279,6 +285,7 @@ void iwl_mld_ptp_init(struct iwl_mld *mld)
mld->ptp_data.ptp_clock_info.owner = THIS_MODULE;
mld->ptp_data.ptp_clock_info.gettime64 = iwl_mld_ptp_gettime;
+ mld->ptp_data.ptp_clock_info.settime64 = iwl_mld_ptp_settime;
mld->ptp_data.ptp_clock_info.max_adj = 0x7fffffff;
mld->ptp_data.ptp_clock_info.adjtime = iwl_mld_ptp_adjtime;
mld->ptp_data.ptp_clock_info.adjfine = iwl_mld_ptp_adjfine;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
index 06a4c9f74797..ad156b82eaa9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
@@ -220,6 +220,12 @@ static int iwl_mvm_ptp_gettime(struct ptp_clock_info *ptp,
return 0;
}
+static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
+ const struct timespec64 *ts)
+{
+ return -EOPNOTSUPP;
+}
+
static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{
struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
@@ -281,6 +287,7 @@ void iwl_mvm_ptp_init(struct iwl_mvm *mvm)
mvm->ptp_data.ptp_clock_info.adjfine = iwl_mvm_ptp_adjfine;
mvm->ptp_data.ptp_clock_info.adjtime = iwl_mvm_ptp_adjtime;
mvm->ptp_data.ptp_clock_info.gettime64 = iwl_mvm_ptp_gettime;
+ mvm->ptp_data.ptp_clock_info.settime64 = iwl_mvm_ptp_settime;
mvm->ptp_data.scaled_freq = SCALE_FACTOR;
/* Give a short 'friendly name' to identify the PHC clock */
--
2.51.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
@ 2025-12-05 22:26 ` Nathan Chancellor
2025-12-06 15:01 ` Simon Horman
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2025-12-05 22:26 UTC (permalink / raw)
To: Yao Zi
Cc: Miri Korenblit, Richard Cochran, Johannes Berg, Anjaneyulu,
Daniel Gabay, linux-wireless, linux-kernel, netdev, Mingcong Bai,
Kexy Biscuit
On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
Thanks, I can confirm this clears up the warning.
Tested-by: Nathan Chancellor <nathan@kernel.org>
> drivers/net/wireless/intel/iwlwifi/mld/ptp.c | 7 +++++++
> drivers/net/wireless/intel/iwlwifi/mvm/ptp.c | 7 +++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> index ffeb37a7f830..231920425c06 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> @@ -121,6 +121,12 @@ static int iwl_mld_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
> @@ -279,6 +285,7 @@ void iwl_mld_ptp_init(struct iwl_mld *mld)
>
> mld->ptp_data.ptp_clock_info.owner = THIS_MODULE;
> mld->ptp_data.ptp_clock_info.gettime64 = iwl_mld_ptp_gettime;
> + mld->ptp_data.ptp_clock_info.settime64 = iwl_mld_ptp_settime;
> mld->ptp_data.ptp_clock_info.max_adj = 0x7fffffff;
> mld->ptp_data.ptp_clock_info.adjtime = iwl_mld_ptp_adjtime;
> mld->ptp_data.ptp_clock_info.adjfine = iwl_mld_ptp_adjfine;
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> index 06a4c9f74797..ad156b82eaa9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> @@ -220,6 +220,12 @@ static int iwl_mvm_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
> @@ -281,6 +287,7 @@ void iwl_mvm_ptp_init(struct iwl_mvm *mvm)
> mvm->ptp_data.ptp_clock_info.adjfine = iwl_mvm_ptp_adjfine;
> mvm->ptp_data.ptp_clock_info.adjtime = iwl_mvm_ptp_adjtime;
> mvm->ptp_data.ptp_clock_info.gettime64 = iwl_mvm_ptp_gettime;
> + mvm->ptp_data.ptp_clock_info.settime64 = iwl_mvm_ptp_settime;
> mvm->ptp_data.scaled_freq = SCALE_FACTOR;
>
> /* Give a short 'friendly name' to identify the PHC clock */
> --
> 2.51.2
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
2025-12-05 22:26 ` Nathan Chancellor
@ 2025-12-06 15:01 ` Simon Horman
2025-12-07 17:58 ` Genes Lists
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2025-12-06 15:01 UTC (permalink / raw)
To: Yao Zi
Cc: Miri Korenblit, Richard Cochran, Johannes Berg, Anjaneyulu,
Daniel Gabay, linux-wireless, linux-kernel, netdev, Mingcong Bai,
Kexy Biscuit, Nathan Chancellor
On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
2025-12-05 22:26 ` Nathan Chancellor
2025-12-06 15:01 ` Simon Horman
@ 2025-12-07 17:58 ` Genes Lists
2025-12-08 11:23 ` Damian Tometzki
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Genes Lists @ 2025-12-07 17:58 UTC (permalink / raw)
To: Yao Zi, Miri Korenblit, Richard Cochran, Johannes Berg,
Anjaneyulu, Daniel Gabay
Cc: linux-wireless, linux-kernel, netdev, Mingcong Bai, Kexy Biscuit,
Nathan Chancellor
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Thu, 2025-12-04 at 12:32 +0000, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register
> if
> required ops are NULL"), PTP clock registered through
> ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither
> MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings
> when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at
> ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
I do see this warning at boot (mainline kernel), but you noted, it all
works fine nonetheless.
I didn't see this in next or mainline yet.
Do you know when this might find it's way to mainline?
thanks
--
Gene
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
` (2 preceding siblings ...)
2025-12-07 17:58 ` Genes Lists
@ 2025-12-08 11:23 ` Damian Tometzki
2025-12-13 8:41 ` Oliver Hartkopp
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Damian Tometzki @ 2025-12-08 11:23 UTC (permalink / raw)
To: Yao Zi
Cc: Miri Korenblit, Richard Cochran, Johannes Berg, Anjaneyulu,
Daniel Gabay, linux-wireless, linux-kernel, netdev, Mingcong Bai,
Kexy Biscuit, Nathan Chancellor
On Thu, 04. Dec 12:32, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
> drivers/net/wireless/intel/iwlwifi/mld/ptp.c | 7 +++++++
> drivers/net/wireless/intel/iwlwifi/mvm/ptp.c | 7 +++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> index ffeb37a7f830..231920425c06 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> @@ -121,6 +121,12 @@ static int iwl_mld_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
> @@ -279,6 +285,7 @@ void iwl_mld_ptp_init(struct iwl_mld *mld)
>
> mld->ptp_data.ptp_clock_info.owner = THIS_MODULE;
> mld->ptp_data.ptp_clock_info.gettime64 = iwl_mld_ptp_gettime;
> + mld->ptp_data.ptp_clock_info.settime64 = iwl_mld_ptp_settime;
> mld->ptp_data.ptp_clock_info.max_adj = 0x7fffffff;
> mld->ptp_data.ptp_clock_info.adjtime = iwl_mld_ptp_adjtime;
> mld->ptp_data.ptp_clock_info.adjfine = iwl_mld_ptp_adjfine;
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> index 06a4c9f74797..ad156b82eaa9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> @@ -220,6 +220,12 @@ static int iwl_mvm_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
> @@ -281,6 +287,7 @@ void iwl_mvm_ptp_init(struct iwl_mvm *mvm)
> mvm->ptp_data.ptp_clock_info.adjfine = iwl_mvm_ptp_adjfine;
> mvm->ptp_data.ptp_clock_info.adjtime = iwl_mvm_ptp_adjtime;
> mvm->ptp_data.ptp_clock_info.gettime64 = iwl_mvm_ptp_gettime;
> + mvm->ptp_data.ptp_clock_info.settime64 = iwl_mvm_ptp_settime;
> mvm->ptp_data.scaled_freq = SCALE_FACTOR;
>
> /* Give a short 'friendly name' to identify the PHC clock */
> --
> 2.51.2
>
Hi,
the patch solved my issue too.
tested-by: damian Tometzki damian@riscv-rocks.de
--
VG
Damian Tometzki
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
` (3 preceding siblings ...)
2025-12-08 11:23 ` Damian Tometzki
@ 2025-12-13 8:41 ` Oliver Hartkopp
2025-12-13 21:19 ` Korenblit, Miriam Rachel
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Oliver Hartkopp @ 2025-12-13 8:41 UTC (permalink / raw)
To: Yao Zi, Miri Korenblit, Richard Cochran, Johannes Berg,
Anjaneyulu, Daniel Gabay
Cc: linux-wireless, linux-kernel, netdev, Mingcong Bai, Kexy Biscuit,
Nathan Chancellor
On 04.12.25 13:32, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
I can see no progress that this patch gets upstreamed.
Who is picking up this fix?
Best regards,
Oliver
> ---
> drivers/net/wireless/intel/iwlwifi/mld/ptp.c | 7 +++++++
> drivers/net/wireless/intel/iwlwifi/mvm/ptp.c | 7 +++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> index ffeb37a7f830..231920425c06 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> @@ -121,6 +121,12 @@ static int iwl_mld_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mld *mld = container_of(ptp, struct iwl_mld,
> @@ -279,6 +285,7 @@ void iwl_mld_ptp_init(struct iwl_mld *mld)
>
> mld->ptp_data.ptp_clock_info.owner = THIS_MODULE;
> mld->ptp_data.ptp_clock_info.gettime64 = iwl_mld_ptp_gettime;
> + mld->ptp_data.ptp_clock_info.settime64 = iwl_mld_ptp_settime;
> mld->ptp_data.ptp_clock_info.max_adj = 0x7fffffff;
> mld->ptp_data.ptp_clock_info.adjtime = iwl_mld_ptp_adjtime;
> mld->ptp_data.ptp_clock_info.adjfine = iwl_mld_ptp_adjfine;
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> index 06a4c9f74797..ad156b82eaa9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> @@ -220,6 +220,12 @@ static int iwl_mvm_ptp_gettime(struct ptp_clock_info *ptp,
> return 0;
> }
>
> +static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
> {
> struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm,
> @@ -281,6 +287,7 @@ void iwl_mvm_ptp_init(struct iwl_mvm *mvm)
> mvm->ptp_data.ptp_clock_info.adjfine = iwl_mvm_ptp_adjfine;
> mvm->ptp_data.ptp_clock_info.adjtime = iwl_mvm_ptp_adjtime;
> mvm->ptp_data.ptp_clock_info.gettime64 = iwl_mvm_ptp_gettime;
> + mvm->ptp_data.ptp_clock_info.settime64 = iwl_mvm_ptp_settime;
> mvm->ptp_data.scaled_freq = SCALE_FACTOR;
>
> /* Give a short 'friendly name' to identify the PHC clock */
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
` (4 preceding siblings ...)
2025-12-13 8:41 ` Oliver Hartkopp
@ 2025-12-13 21:19 ` Korenblit, Miriam Rachel
2025-12-14 10:12 ` David Wang
2025-12-22 10:43 ` Paolo Abeni
7 siblings, 0 replies; 12+ messages in thread
From: Korenblit, Miriam Rachel @ 2025-12-13 21:19 UTC (permalink / raw)
To: Yao Zi, Richard Cochran, Berg, Johannes,
Anjaneyulu, Pagadala Yesu, Gabay, Daniel
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Mingcong Bai, Kexy Biscuit,
Nathan Chancellor
> -----Original Message-----
> From: Yao Zi <ziyao@disroot.org>
> Sent: Thursday, December 4, 2025 2:32 PM
> To: Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>; Richard
> Cochran <richardcochran@gmail.com>; Berg, Johannes
> <johannes.berg@intel.com>; Anjaneyulu, Pagadala Yesu
> <pagadala.yesu.anjaneyulu@intel.com>; Gabay, Daniel
> <daniel.gabay@intel.com>
> Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> netdev@vger.kernel.org; Mingcong Bai <jeffbai@aosc.io>; Kexy Biscuit
> <kexybiscuit@aosc.io>; Yao Zi <ziyao@disroot.org>; Nathan Chancellor
> <nathan@kernel.org>
> Subject: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for
> MVM/MLD PTP
>
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register is
> required to have ptp_clock_info.settime64 set, however, neither MVM nor MLD's
> PTP clock implementation sets it, resulting in warnings when the interface starts
> up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8,
> CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101
> PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8 iwlwifi 0000:01:00.0:
> Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64() for
> iwlwifi MLD/MVM, thus instead create a stub that returns -EOPTNOTSUPP only,
> suppressing the warning and allowing the PTP clock to be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
> drivers/net/wireless/intel/iwlwifi/mld/ptp.c | 7 +++++++
> drivers/net/wireless/intel/iwlwifi/mvm/ptp.c | 7 +++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> index ffeb37a7f830..231920425c06 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/ptp.c
> @@ -121,6 +121,12 @@ static int iwl_mld_ptp_gettime(struct ptp_clock_info
> *ptp,
> return 0;
> }
>
> +static int iwl_mld_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mld_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) {
> struct iwl_mld *mld = container_of(ptp, struct iwl_mld, @@ -279,6
> +285,7 @@ void iwl_mld_ptp_init(struct iwl_mld *mld)
>
> mld->ptp_data.ptp_clock_info.owner = THIS_MODULE;
> mld->ptp_data.ptp_clock_info.gettime64 = iwl_mld_ptp_gettime;
> + mld->ptp_data.ptp_clock_info.settime64 = iwl_mld_ptp_settime;
> mld->ptp_data.ptp_clock_info.max_adj = 0x7fffffff;
> mld->ptp_data.ptp_clock_info.adjtime = iwl_mld_ptp_adjtime;
> mld->ptp_data.ptp_clock_info.adjfine = iwl_mld_ptp_adjfine; diff --git
> a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> index 06a4c9f74797..ad156b82eaa9 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
> @@ -220,6 +220,12 @@ static int iwl_mvm_ptp_gettime(struct ptp_clock_info
> *ptp,
> return 0;
> }
>
> +static int iwl_mvm_ptp_settime(struct ptp_clock_info *ptp,
> + const struct timespec64 *ts)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static int iwl_mvm_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) {
> struct iwl_mvm *mvm = container_of(ptp, struct iwl_mvm, @@ -281,6
> +287,7 @@ void iwl_mvm_ptp_init(struct iwl_mvm *mvm)
> mvm->ptp_data.ptp_clock_info.adjfine = iwl_mvm_ptp_adjfine;
> mvm->ptp_data.ptp_clock_info.adjtime = iwl_mvm_ptp_adjtime;
> mvm->ptp_data.ptp_clock_info.gettime64 = iwl_mvm_ptp_gettime;
> + mvm->ptp_data.ptp_clock_info.settime64 = iwl_mvm_ptp_settime;
> mvm->ptp_data.scaled_freq = SCALE_FACTOR;
>
> /* Give a short 'friendly name' to identify the PHC clock */
> --
> 2.51.2
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
` (5 preceding siblings ...)
2025-12-13 21:19 ` Korenblit, Miriam Rachel
@ 2025-12-14 10:12 ` David Wang
2025-12-15 3:42 ` Yao Zi
2025-12-22 10:43 ` Paolo Abeni
7 siblings, 1 reply; 12+ messages in thread
From: David Wang @ 2025-12-14 10:12 UTC (permalink / raw)
To: ziyao, thostet
Cc: daniel.gabay, jeffbai, johannes.berg, kexybiscuit, linux-kernel,
linux-wireless, miriam.rachel.korenblit, nathan, netdev,
pagadala.yesu.anjaneyulu, richardcochran
On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
This seems disturbing....If a null settime64 deserve a kernel WARN dump, so should
a settime64 which returns error.
Before fixing the warning, the expected behavior of settime64 should be specified clearly,
hence why the dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if required ops are NULL")?
David
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-14 10:12 ` David Wang
@ 2025-12-15 3:42 ` Yao Zi
2025-12-15 4:20 ` David Wang
0 siblings, 1 reply; 12+ messages in thread
From: Yao Zi @ 2025-12-15 3:42 UTC (permalink / raw)
To: David Wang, thostet
Cc: daniel.gabay, jeffbai, johannes.berg, kexybiscuit, linux-kernel,
linux-wireless, miriam.rachel.korenblit, nathan, netdev,
pagadala.yesu.anjaneyulu, richardcochran, Kuniyuki Iwashima
On Sun, Dec 14, 2025 at 06:12:57PM +0800, David Wang wrote:
> On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
> > Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> > required ops are NULL"), PTP clock registered through ptp_clock_register
> > is required to have ptp_clock_info.settime64 set, however, neither MVM
> > nor MLD's PTP clock implementation sets it, resulting in warnings when
> > the interface starts up, like
> >
> > WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> > CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> > ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> > ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> > iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
> >
> > I don't find an appropriate firmware interface to implement settime64()
> > for iwlwifi MLD/MVM, thus instead create a stub that returns
> > -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> > be registered.
>
> This seems disturbing....If a null settime64 deserve a kernel WARN dump, so should
> a settime64 which returns error.
They're separate things. A ptp clock implementing not provinding
settime64() or gettime64()/gettimex64() callback will crash when
userspace tries to call clock_gettime()/clock_settime() on it, since
either ptp_clock_settime() or ptp_clock_gettime() invokes these
callbacks unconditionally.
However, failing with -ENOTSUPP/-EOPNOTSUPP when clock_settime() isn't
supported by a dynamic POSIX clock device is a documented behavior, see
man-page clock_getres(2).
> Before fixing the warning, the expected behavior of settime64 should be specified clearly,
I think failing with -EOPNOTSUPP (which is the same as -ENOTSUPP on
Linux) when the operation isn't supported is well-documented, and is
suitable for this case.
One may argue that it'd be helpful for ptp_clock_register() to provide
a default implementation of settime64() that always fails with
-EOPNOTSUPP when the driver doesn't provide one.
However, it's likely a programming bug when gettime64()/settime64() is
missing, so the current behavior of warning sounds reasonable to me.
> hence why the dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if required ops are NULL")?
You may be interested in the original series[1] where the idea of
warning for missing settime64/gettime64/gettimex64 callbacks came up.
Also cc Kuniyuki, in case that I missed something or got it wrong.
>
> David
Best regards,
Yao Zi
> >
> > Reported-by: Nathan Chancellor <nathan@kernel.org>
> > Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
>
[1]: https://lore.kernel.org/all/20251028095143.396385-1-junjie.cao@intel.com/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-15 3:42 ` Yao Zi
@ 2025-12-15 4:20 ` David Wang
2025-12-15 17:41 ` Yao Zi
0 siblings, 1 reply; 12+ messages in thread
From: David Wang @ 2025-12-15 4:20 UTC (permalink / raw)
To: Yao Zi
Cc: thostet, daniel.gabay, jeffbai, johannes.berg, kexybiscuit,
linux-kernel, linux-wireless, miriam.rachel.korenblit, nathan,
netdev, pagadala.yesu.anjaneyulu, richardcochran,
Kuniyuki Iwashima
At 2025-12-15 11:42:17, "Yao Zi" <me@ziyao.cc> wrote:
>On Sun, Dec 14, 2025 at 06:12:57PM +0800, David Wang wrote:
>> On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
>> > Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
>> > required ops are NULL"), PTP clock registered through ptp_clock_register
>> > is required to have ptp_clock_info.settime64 set, however, neither MVM
>> > nor MLD's PTP clock implementation sets it, resulting in warnings when
>> > the interface starts up, like
>> >
>> > WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
>> > CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
>> > ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
>> > ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
>> > iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>> >
>> > I don't find an appropriate firmware interface to implement settime64()
>> > for iwlwifi MLD/MVM, thus instead create a stub that returns
>> > -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
>> > be registered.
>>
>> This seems disturbing....If a null settime64 deserve a kernel WARN dump, so should
>> a settime64 which returns error.
>
>They're separate things. A ptp clock implementing not provinding
>settime64() or gettime64()/gettimex64() callback will crash when
>userspace tries to call clock_gettime()/clock_settime() on it, since
>either ptp_clock_settime() or ptp_clock_gettime() invokes these
>callbacks unconditionally.
>
>However, failing with -ENOTSUPP/-EOPNOTSUPP when clock_settime() isn't
>supported by a dynamic POSIX clock device is a documented behavior, see
>man-page clock_getres(2).
>
>> Before fixing the warning, the expected behavior of settime64 should be specified clearly,
>
>I think failing with -EOPNOTSUPP (which is the same as -ENOTSUPP on
>Linux) when the operation isn't supported is well-documented, and is
>suitable for this case.
>
>One may argue that it'd be helpful for ptp_clock_register() to provide
>a default implementation of settime64() that always fails with
>-EOPNOTSUPP when the driver doesn't provide one.
>
>However, it's likely a programming bug when gettime64()/settime64() is
>missing, so the current behavior of warning sounds reasonable to me.
>
>> hence why the dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if required ops are NULL")?
>
>You may be interested in the original series[1] where the idea of
>warning for missing settime64/gettime64/gettimex64 callbacks came up.
Thanks for the information, this link holds way more relevant information than the *Link* tag in dfb073d32cac. :)
But isn't the patch in [1] and similar change to settime64 better?
What is the difference between a null callback and a callback returning error? aren't they saying the same
thing: "this device does not support it"?
David
>
>Also cc Kuniyuki, in case that I missed something or got it wrong.
>
>>
>> David
>
>Best regards,
>Yao Zi
>
>> >
>> > Reported-by: Nathan Chancellor <nathan@kernel.org>
>> > Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
>> > Signed-off-by: Yao Zi <ziyao@disroot.org>
>> > ---
>>
>
>[1]: https://lore.kernel.org/all/20251028095143.396385-1-junjie.cao@intel.com/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-15 4:20 ` David Wang
@ 2025-12-15 17:41 ` Yao Zi
0 siblings, 0 replies; 12+ messages in thread
From: Yao Zi @ 2025-12-15 17:41 UTC (permalink / raw)
To: David Wang
Cc: thostet, daniel.gabay, jeffbai, johannes.berg, kexybiscuit,
linux-kernel, linux-wireless, miriam.rachel.korenblit, nathan,
netdev, pagadala.yesu.anjaneyulu, richardcochran,
Kuniyuki Iwashima
On Mon, Dec 15, 2025 at 12:20:43PM +0800, David Wang wrote:
>
> At 2025-12-15 11:42:17, "Yao Zi" <me@ziyao.cc> wrote:
> >On Sun, Dec 14, 2025 at 06:12:57PM +0800, David Wang wrote:
> >> On Thu, Dec 04, 2025 at 12:32:04PM +0000, Yao Zi wrote:
> >> > Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> >> > required ops are NULL"), PTP clock registered through ptp_clock_register
> >> > is required to have ptp_clock_info.settime64 set, however, neither MVM
> >> > nor MLD's PTP clock implementation sets it, resulting in warnings when
> >> > the interface starts up, like
> >> >
> >> > WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> >> > CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> >> > ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> >> > ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> >> > iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
> >> >
> >> > I don't find an appropriate firmware interface to implement settime64()
> >> > for iwlwifi MLD/MVM, thus instead create a stub that returns
> >> > -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> >> > be registered.
> >>
> >> This seems disturbing....If a null settime64 deserve a kernel WARN dump, so should
> >> a settime64 which returns error.
> >
> >They're separate things. A ptp clock implementing not provinding
> >settime64() or gettime64()/gettimex64() callback will crash when
> >userspace tries to call clock_gettime()/clock_settime() on it, since
> >either ptp_clock_settime() or ptp_clock_gettime() invokes these
> >callbacks unconditionally.
> >
> >However, failing with -ENOTSUPP/-EOPNOTSUPP when clock_settime() isn't
> >supported by a dynamic POSIX clock device is a documented behavior, see
> >man-page clock_getres(2).
> >
> >> Before fixing the warning, the expected behavior of settime64 should be specified clearly,
> >
> >I think failing with -EOPNOTSUPP (which is the same as -ENOTSUPP on
> >Linux) when the operation isn't supported is well-documented, and is
> >suitable for this case.
> >
> >One may argue that it'd be helpful for ptp_clock_register() to provide
> >a default implementation of settime64() that always fails with
> >-EOPNOTSUPP when the driver doesn't provide one.
> >
> >However, it's likely a programming bug when gettime64()/settime64() is
> >missing, so the current behavior of warning sounds reasonable to me.
> >
> >> hence why the dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if required ops are NULL")?
> >
> >You may be interested in the original series[1] where the idea of
> >warning for missing settime64/gettime64/gettimex64 callbacks came up.
>
> Thanks for the information, this link holds way more relevant information than the *Link* tag in dfb073d32cac. :)
>
> But isn't the patch in [1] and similar change to settime64 better?
> What is the difference between a null callback and a callback returning error? aren't they saying the same
> thing: "this device does not support it"?
As I said earlier,
> However, it's likely a programming bug when gettime64()/settime64() is
> missing
but usually you know what exactly happens here when writing a stub
returning -EOPNOTSUPP. IMO this should be the difference.
Quoting Vadim in the original series,
> WARN_ON_ONCE is better in terms of reducing the amount of review work.
> Driver developers will be automatically notified about improper
> implementation while Junjie's patch will simply hide the problem.[2]
Regards,
Yao Zi
>
>
> David
>
> >
> >Also cc Kuniyuki, in case that I missed something or got it wrong.
> >
> >>
> >> David
> >
> >Best regards,
> >Yao Zi
> >
> >> >
> >> > Reported-by: Nathan Chancellor <nathan@kernel.org>
> >> > Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> >> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> >> > ---
> >>
> >
> >[1]: https://lore.kernel.org/all/20251028095143.396385-1-junjie.cao@intel.com/
[2]: https://lore.kernel.org/all/b4d675a4-b7ad-4ecf-8d19-6bf08b452472@linux.dev/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
` (6 preceding siblings ...)
2025-12-14 10:12 ` David Wang
@ 2025-12-22 10:43 ` Paolo Abeni
7 siblings, 0 replies; 12+ messages in thread
From: Paolo Abeni @ 2025-12-22 10:43 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, linux-kernel, netdev, Mingcong Bai, Kexy Biscuit,
Nathan Chancellor, Yao Zi, Richard Cochran, Miri Korenblit,
Anjaneyulu, Daniel Gabay
On 12/4/25 1:32 PM, Yao Zi wrote:
> Since commit dfb073d32cac ("ptp: Return -EINVAL on ptp_clock_register if
> required ops are NULL"), PTP clock registered through ptp_clock_register
> is required to have ptp_clock_info.settime64 set, however, neither MVM
> nor MLD's PTP clock implementation sets it, resulting in warnings when
> the interface starts up, like
>
> WARNING: drivers/ptp/ptp_clock.c:325 at ptp_clock_register+0x2c8/0x6b8, CPU#1: wpa_supplicant/469
> CPU: 1 UID: 0 PID: 469 Comm: wpa_supplicant Not tainted 6.18.0+ #101 PREEMPT(full)
> ra: ffff800002732cd4 iwl_mvm_ptp_init+0x114/0x188 [iwlmvm]
> ERA: 9000000002fdc468 ptp_clock_register+0x2c8/0x6b8
> iwlwifi 0000:01:00.0: Failed to register PHC clock (-22)
>
> I don't find an appropriate firmware interface to implement settime64()
> for iwlwifi MLD/MVM, thus instead create a stub that returns
> -EOPTNOTSUPP only, suppressing the warning and allowing the PTP clock to
> be registered.
>
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Closes: https://lore.kernel.org/all/20251108044822.GA3262936@ax162/
> Signed-off-by: Yao Zi <ziyao@disroot.org>
@Johannes: I think this patch is already in your tree, if so, can you
please share a PR with it? there are a few notable users hit by such
warning:
https://lore.kernel.org/
netdev/221ba5ce-8652-4bc4-8d4a-6fc379e32ef8@hartkopp.net/T/
#m3e671c8c9a482d90a6fa81e953af723af5546118
Otherwise I could directly apply the patch to 'net' before the next PR
to Linus (on ~30 Dec).
Please LMK!
Thanks,
Paolo
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-12-22 10:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 12:32 [PATCH iwlwifi-fixes] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Yao Zi
2025-12-05 22:26 ` Nathan Chancellor
2025-12-06 15:01 ` Simon Horman
2025-12-07 17:58 ` Genes Lists
2025-12-08 11:23 ` Damian Tometzki
2025-12-13 8:41 ` Oliver Hartkopp
2025-12-13 21:19 ` Korenblit, Miriam Rachel
2025-12-14 10:12 ` David Wang
2025-12-15 3:42 ` Yao Zi
2025-12-15 4:20 ` David Wang
2025-12-15 17:41 ` Yao Zi
2025-12-22 10:43 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).