[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aO-xnXskSie2PKQq@horms.kernel.org>
Date: Wed, 15 Oct 2025 15:37:17 +0100
From: Simon Horman <horms@...nel.org>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Egor Pomozov <epomozov@...vell.com>,
Potnuri Bharat Teja <bharat@...lsio.com>,
Dimitris Michailidis <dmichail@...gible.com>,
MD Danish Anwar <danishanwar@...com>,
Roger Quadros <rogerq@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>,
Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 5/7] cxgb4: convert to ndo_hwtstamp API
On Wed, Oct 15, 2025 at 11:33:02AM +0100, Vadim Fedorenko wrote:
> On 15/10/2025 11:05, Simon Horman wrote:
> > On Tue, Oct 14, 2025 at 10:42:14PM +0000, Vadim Fedorenko wrote:
> > > Convert to use .ndo_hwtstamp_get()/.ndo_hwtstamp_set() callbacks.
> > >
> > > Though I'm not quite sure it worked properly before the conversion.
> > >
> > > Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
> >
> > Hi Vadim,
> >
> > There is quite a lot of change here. Probably it's not worth "fixing"
> > the current code before migrating it. But I think it would be worth
> > expanding a bit on the statement about not being sure it worked?
>
> Hi Simon!
>
> Well, let me try to explain the statement about not being sure it
> worked. The original code was copying new configuration into netdev's
> private structure before validating that the values are acceptable by
> the hardware. In case of error, the driver was not restoring original
> values, and after the call:
>
> ioctl(SIOCSHWTSTAMP, <unsupported_config>) = -ERANGE
>
> the driver would have configuration which could not be reapplied and not
> synced to the actual hardware config:
>
> ioctl(SIOCGHWTSTAMP) = <unsupported_config>
>
> The logic change in the patch is to just keep original configuration in
> case of -ERANGE error. Otherwise the logic is not changed.
Thanks Vadim,
I see that now and it makes sense to me.
I do think it would be worth mentioning in the patch description.
Powered by blists - more mailing lists