Re: [PATCH resend net-next 1/1] net: stmmac: actually error requests to change the auxiliary snapshot capture channel
From: David Laight
Date: Thu Mar 12 2026 - 15:00:57 EST
On Thu, 12 Mar 2026 15:07:49 +0100
Paolo Abeni <pabeni@xxxxxxxxxx> wrote:
> 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.
I did wonder why the 'half hearted' support for multiple snapshots
was added at all.
Either it is needed and should be done properly or always using a fixed
snapshot bit is fine.
Not that I've any idea what this code is for...
David
>
> /P
>
>