Re: [PATCH resend net-next 1/1] net: stmmac: actually error requests to change the auxiliary snapshot capture channel

From: Paolo Abeni

Date: Thu Mar 12 2026 - 10:08:29 EST


On 3/10/26 3:01 PM, david.laight.linux@xxxxxxxxx wrote:
> From: David Laight <david.laight.linux@xxxxxxxxx>
>
> Commit 2ddd05d1d5ed ("net: stmmac: do not silently change auxiliary snapshot capture channel")
> added code that attempted to return -EBUSY to a PTP_CLK_REQ_EXTTS
> request whan a snapshot was already enabled.
> However it tested bits in 'acr_value' after they had been masked off
> so the check would never return an error.
>
> Change the code so that the test actually works.
> Note that when the commit message says:
> Previously in case of a PTP_CLK_REQ_EXTTS request, previously active
> auxiliary snapshot capture channels were silently dropped and the new
> channel was activated.
> this only refers to two commits earlier (a few minutes earlier).
> Prior to that only a single fixed snapshot channel could be enabled.
>
> Note that the check will reject requests to re-enable the currently
> enabled channel.
> Plausibly the best fix is just to delete the check completely.

I agree with this last statement. Enforcing the check could potentially
break the user-space.

/P