RE: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-08 Thread Rafal Ozieblo
org; > harini.kata...@xilinx.com; andrei.pistir...@microchip.com > Subject: Re: [PATCH v2 4/4] net: macb: Add hardware PTP support > > ** EXTERNAL MAIL. PLEASE USE CAUTION WHEN CLICKING LINKS > OR OPENING ATTACHMENTS ** > > On Wed, Jun 07, 2017 at 11:13:36AM +,

Re: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-07 Thread Richard Cochran
On Wed, Jun 07, 2017 at 11:13:36AM +, Rafal Ozieblo wrote: > Please look at following call-stack: > > 1. macb_interrupt() // spin_lock(&bp->lock) is taken > 2. macb_tx_interrupt() > 3. macb_handle_txtstamp() > 4. skb_tstamp_tx() > 5. __skb_tstamp_tx() > 6. skb_may_tx_timestamp() > 7. read_lo

RE: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-07 Thread Rafal Ozieblo
org; > harini.kata...@xilinx.com; andrei.pistir...@microchip.com > Subject: Re: [PATCH v2 4/4] net: macb: Add hardware PTP support > > On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote: > > +static void gem_ptp_clear_timer(struct macb *bp) > > +{ > > + bp-&

Re: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-06 Thread Richard Cochran
On Tue, Jun 06, 2017 at 08:54:50AM +, Rafal Ozieblo wrote: > Would "ENOTSUP" be sufficient ? You mean EOPNOTSUPP? Yes, sounds ok to me. EFAULT is surely wrong. Thanks, Richard

Re: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-06 Thread Richard Cochran
On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote: > +static s32 gem_get_ptp_max_adj(void) > +{ > + return 64E6; > +} This is a floating point constant. Please use integer instead. > + > +static int gem_get_ts_info(struct net_device *dev, > +struct ethtool

RE: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-06 Thread Rafal Ozieblo
org; > harini.kata...@xilinx.com; andrei.pistir...@microchip.com > Subject: Re: [PATCH v2 4/4] net: macb: Add hardware PTP support > > On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote: > > > +int gem_get_hwtst(struct net_device *dev, struct ifreq *rq) > >

Re: [PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-04 Thread Richard Cochran
On Fri, Jun 02, 2017 at 03:28:10PM +0100, Rafal Ozieblo wrote: > +int gem_get_hwtst(struct net_device *dev, struct ifreq *rq) > +{ > + struct macb *bp = netdev_priv(dev); > + struct hwtstamp_config *tstamp_config = &bp->tstamp_config; > + > + if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0)

[PATCH v2 4/4] net: macb: Add hardware PTP support

2017-06-02 Thread Rafal Ozieblo
This patch is based on original Harini's patch and Andrei's patch, implemented in a separate file to ease the review/maintanance and integration with other platforms. This driver supports GEM-GXL: - Register ptp clock framework - Initialize PTP related registers - HW time stamp on the PTP Ethernet