Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-20 Thread kbuild test robot
Hi Antoine, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Antoine-Tenart/net-mscc-PTP-Hardware-Clock-PHC-support/20190707-075931 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (G

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-09 Thread Antoine Tenart
Hello Jakub, On Mon, Jul 08, 2019 at 12:06:26PM -0700, Jakub Kicinski wrote: > On Mon, 8 Jul 2019 10:48:09 +0200, Antoine Tenart wrote: > > > > + /* Commit back the result & save it */ > > > > + memcpy(&ocelot->hwtstamp_config, &cfg, sizeof(cfg)); > > > > + mutex_unlock(&ocelot->

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-08 Thread Jakub Kicinski
On Mon, 8 Jul 2019 10:48:09 +0200, Antoine Tenart wrote: > > > + /* Commit back the result & save it */ > > > + memcpy(&ocelot->hwtstamp_config, &cfg, sizeof(cfg)); > > > + mutex_unlock(&ocelot->ptp_lock); > > > + > > > + return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0; > > > +}

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-08 Thread Antoine Tenart
Hello Jakub, On Fri, Jul 05, 2019 at 03:10:38PM -0700, Jakub Kicinski wrote: > On Fri, 5 Jul 2019 21:52:13 +0200, Antoine Tenart wrote: > > @@ -596,11 +606,50 @@ static int ocelot_port_xmit(struct sk_buff *skb, > > struct net_device *dev) > > > > dev->stats.tx_packets++; > > dev->stats

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-08 Thread Antoine Tenart
Hi Richard, On Fri, Jul 05, 2019 at 03:02:24PM -0700, Richard Cochran wrote: > On Fri, Jul 05, 2019 at 09:52:13PM +0200, Antoine Tenart wrote: > > +static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg) > > +{ > > + struct ocelot *ocelot = arg; > > + > > + do { > > > + /*

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 21:52:13 +0200, Antoine Tenart wrote: > This patch adds support for PTP Hardware Clock (PHC) to the Ocelot > switch for both PTP 1-step and 2-step modes. > > Signed-off-by: Antoine Tenart > @@ -596,11 +606,50 @@ static int ocelot_port_xmit(struct sk_buff *skb, struct > net_d

Re: [PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Richard Cochran
On Fri, Jul 05, 2019 at 09:52:13PM +0200, Antoine Tenart wrote: > +static irqreturn_t ocelot_ptp_rdy_irq_handler(int irq, void *arg) > +{ > + struct ocelot *ocelot = arg; > + > + do { > + /* Check if a timestamp can be retrieved */ > + if (!(val & SYS_PTP_STATUS_PTP

[PATCH net-next v2 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot switch for both PTP 1-step and 2-step modes. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.c | 393 ++- drivers/net/ethernet/mscc/ocelot.h | 37 +++ drivers/net/ethernet/mscc/