On Wed, 8 Jul 2020 22:20:18 +0530 sundeep.l...@gmail.com wrote: > From: Aleksey Makarov <amaka...@marvell.com> > > This patch adds PTP clock and uses it in Octeontx2 > network device. PTP clock uses mailbox calls to > access the hardware counter on the RVU side. > > Co-developed-by: Subbaraya Sundeep <sbha...@marvell.com> > Signed-off-by: Subbaraya Sundeep <sbha...@marvell.com> > Signed-off-by: Aleksey Makarov <amaka...@marvell.com> > Signed-off-by: Sunil Goutham <sgout...@marvell.com>
Please address the new sparse warnings as well: drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:130:42: warning: cast to restricted __be64 > +static inline void otx2_set_rxtstamp(struct otx2_nic *pfvf, > + struct sk_buff *skb, void *data) > +{ Please don't use static inline in C files, compiler will know which static functions to inline, and static inline covers up unused code. > + u64 tsns; > + int err; > + > + if (!(pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED)) > + return; > + > + /* The first 8 bytes is the timestamp */ > + err = otx2_ptp_tstamp2time(pfvf, be64_to_cpu(*(u64 *)data), &tsns); > + if (err) > + return; > + > + skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(tsns); > +}