[PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-28 Thread Sudarsana Kalluru
From: Sudarsana Reddy Kalluru The patch adds the required qed interfaces for configuring/reading the PTP clock on the adapter. Signed-off-by: Sudarsana Reddy Kalluru --- drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread kbuild test robot
Hi Sudarsana, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Sudarsana-Kalluru/qed-Add-support-for-PTP/20170129-153407 config: parisc-allyesconfig (attached as .config) compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread Richard Cochran
On Sat, Jan 28, 2017 at 11:28:22PM -0800, Sudarsana Kalluru wrote: > +/* Read Rx timestamp */ > +static int qed_ptp_hw_read_rx_ts(struct qed_dev *cdev, u64 *timestamp) > +{ > + struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); > + struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt; > + u32 val;

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread Richard Cochran
On Sat, Jan 28, 2017 at 11:28:22PM -0800, Sudarsana Kalluru wrote: > +/* Adjust the HW clock by a rate given in parts-per-million (ppm) units. > + * FW/HW accepts the adjustment value in terms of 3 parameters: > + * Drift period - adjustment happens once in certain number of nano > seconds. > +

RE: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread Mintz, Yuval
> > +/* Read Rx timestamp */ > > +static int qed_ptp_hw_read_rx_ts(struct qed_dev *cdev, u64 > > +*timestamp) { > > + struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); > > + struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt; > > + u32 val; > > + > > + *timestamp = 0; > > + val = qed_rd(p_hwfn, p_

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread Richard Cochran
On Sun, Jan 29, 2017 at 05:26:13PM +, Mintz, Yuval wrote: > We could - but what difference would it make? It would reduce the chance of missing the next time stamp. Thanks, Richard

RE: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-29 Thread Mintz, Yuval
> > We could - but what difference would it make? > > It would reduce the chance of missing the next time stamp. I might have gotten it all wrong, but I was under the assumption that time- stamped packets are periodic, and that the interval between two isn't going to be so small. Is so, how does

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-30 Thread Richard Cochran
On Sun, Jan 29, 2017 at 09:36:11PM +, Mintz, Yuval wrote: > I might have gotten it all wrong, but I was under the assumption that time- > stamped packets are periodic, and that the interval between two isn't > going to be so small. That is an incorrect assumption. Consider the Delay_Req packe

Re: [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support.

2017-01-30 Thread Mintz, Yuval
> > I might have gotten it all wrong, but I was under the assumption that time- > > stamped packets are periodic, and that the interval between two isn't > > going to be so small. > That is an incorrect assumption.  Consider the Delay_Req packets > arriving on a port in the MASTER state. Right; I