[Linux-stm32] [PATCH net] net: stmmac: ptp: fix support for PTP_EXTTS_REQUEST2 ioctl

Jacob Keller jacob.e.keller at intel.com
Wed Nov 4 22:12:23 CET 2026


On 11/4/2026 12:58 AM, Maxime Chevallier wrote:
>> Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info")
>> Cc: stable at vger.kernel.org
>> Signed-off-by: James Clark <jjc at jclark.com>
> 
> funny this wasn't noticed before, this looks good to me :)
> 

A lot of programs still use the older PTP_EXTTS_REQUEST ioctl which is
permissive and doesn't enforce the edge request, so i suspect a lot of
software just doesn't trigger this.

> I've tested this on cyclone V, stm32mp157 and imx8mp,
> 

Great, thanks!

> Tested-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> 
> Thanks,
> 
> Maxime
> 
>> ---
>> I used an LLM coding assistant to help prepare this patch.
>>
>>  drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
>> index a37405534beb..31a66e855d6b 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
>> @@ -277,6 +277,7 @@ const struct ptp_clock_info stmmac_ptp_clock_ops = {
>>  	.n_per_out = 0, /* will be overwritten in stmmac_ptp_register */
>>  	.n_pins = 0,
>>  	.pps = 0,
>> +	.supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
>>  	.adjfine = stmmac_adjust_freq,
>>  	.adjtime = stmmac_adjust_time,
>>  	.gettimex64 = stmmac_get_timex,
>> @@ -294,6 +295,7 @@ const struct ptp_clock_info dwmac1000_ptp_clock_ops = {
>>  	.n_per_out = 0,
>>  	.n_pins = 0,
>>  	.pps = 0,
>> +	.supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
>>  	.adjfine = stmmac_adjust_freq,
>>  	.adjtime = stmmac_adjust_time,
>>  	.gettimex64 = stmmac_get_timex,
> 



More information about the Linux-stm32 mailing list