lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support
On Wed, Nov 23, 2022 at 01:57:47PM +0000, Arun.Ramadoss@microchip.com wrote:
> > What's your excuse which such a horrible code pattern? What will happen
> > so bad with the packet if it's flagged with a TX timestamp request in
> > KSZ_SKB_CB(skb) at the same time as REG_PTP_MSG_CONF1 is written to?
> >
> > Also, doesn't dev->ports[port].hwts_tx_en serve as a guard against
> > flagging packets for TX timestamps when you shouldn't?
> >
>
> I took this configuration template routine from other driver.

Not really a good excuse. The sja1105 driver has more hardware-specific
issues to deal with, not necessarily the same as ksz.

> Can I replace above snippet with
>
> tagger_data->hwtstamp_set_state(dev->ds, rx_on);
> ret = ksz_ptp_enable_mode(dev, rx_on);
> if (ret)
> return ret;

Why do you need to call hwtstamp_set_state anyway?

\
 
 \ /
  Last update: 2022-11-24 11:23    [W:0.085 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site