mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Martin Kaistra <martin.kaistra@linutronix.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Boyd <sboyd@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 7/7] net: dsa: b53: Expose PTP timestamping ioctls to userspace
Date: Mon, 8 Nov 2021 06:48:24 -0800	[thread overview]
Message-ID: <20211108144824.GD7170@hoboy.vegasvil.org> (raw)
In-Reply-To: <20211107142703.tid4l4onr6y2gxic@skbuf>

On Sun, Nov 07, 2021 at 04:27:03PM +0200, Vladimir Oltean wrote:
> On Sun, Nov 07, 2021 at 06:05:34AM -0800, Richard Cochran wrote:
> >         switch (cfg.rx_filter) {
> >         case HWTSTAMP_FILTER_NONE:
> >                 break;
> >         case HWTSTAMP_FILTER_ALL:
> >         case HWTSTAMP_FILTER_SOME:
> >         case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
> >         case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
> >         case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
> >         case HWTSTAMP_FILTER_NTP_ALL:
> >         case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
> >         case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
> >         case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
> >         case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
> >         case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
> >         case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
> >         case HWTSTAMP_FILTER_PTP_V2_EVENT:
> >         case HWTSTAMP_FILTER_PTP_V2_SYNC:
> >         case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
> >                 cfg.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
> >                 break;
> >         default:
> >                 mutex_unlock(&ocelot->ptp_lock);
> >                 return -ERANGE;
> >         }
> > 
> > That is essentially an upgrade to HWTSTAMP_FILTER_PTP_V2_EVENT.  The
> > change from ALL to HWTSTAMP_FILTER_PTP_V2_EVENT is probably a simple
> > oversight, and the driver can be easily fixed.
> > 
> > Thanks,
> > Richard
> 
> It's essentially the same pattern as what Martin is introducing for b53.

Uh, no it isn't.  The present patch has:

+       case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
+       case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
+       case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
+       case HWTSTAMP_FILTER_PTP_V2_EVENT:
+       case HWTSTAMP_FILTER_PTP_V2_SYNC:
+       case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
+       case HWTSTAMP_FILTER_ALL:
+               config->rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;

There is an important difference between
HWTSTAMP_FILTER_PTP_V2_L2_EVENT and HWTSTAMP_FILTER_PTP_V2_EVENT

Notice the "L2" in there.

Thanks,
Richard

  reply	other threads:[~2021-11-08 14:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 13:31 [PATCH 0/7] Add PTP support for BCM53128 switch Martin Kaistra
2021-11-04 13:31 ` [PATCH 1/7] net: dsa: b53: Add BroadSync HD register definitions Martin Kaistra
2021-11-06  2:29   ` Florian Fainelli
2021-11-04 13:31 ` [PATCH 2/7] net: dsa: b53: Move struct b53_device to include/linux/dsa/b53.h Martin Kaistra
2021-11-04 13:31 ` [PATCH 3/7] timecounter: allow for non-power of two overflow Martin Kaistra
2021-11-04 13:31 ` [PATCH 4/7] net: dsa: b53: Add PHC clock support Martin Kaistra
2021-11-04 17:28   ` Richard Cochran
2021-11-04 17:49     ` Richard Cochran
2021-11-06  2:32   ` Florian Fainelli
2021-11-08 15:00     ` Martin Kaistra
2021-11-04 13:31 ` [PATCH 5/7] net: dsa: b53: Add logic for RX timestamping Martin Kaistra
2021-11-06  2:36   ` Florian Fainelli
2021-11-04 13:32 ` [PATCH 6/7] net: dsa: b53: Add logic for TX timestamping Martin Kaistra
2021-11-06  2:50   ` Florian Fainelli
2021-11-08  9:57     ` Martin Kaistra
2021-11-04 13:32 ` [PATCH 7/7] net: dsa: b53: Expose PTP timestamping ioctls to userspace Martin Kaistra
2021-11-04 17:42   ` Richard Cochran
2021-11-05 13:38     ` Martin Kaistra
2021-11-05 14:13       ` Richard Cochran
2021-11-05 14:14         ` Richard Cochran
2021-11-05 14:28         ` Vladimir Oltean
2021-11-05 15:09           ` Jakub Kicinski
2021-11-05 17:25             ` Vladimir Oltean
2021-11-06  0:18           ` Richard Cochran
2021-11-06  0:36             ` Vladimir Oltean
2021-11-07 14:05               ` Richard Cochran
2021-11-07 14:27                 ` Vladimir Oltean
2021-11-08 14:48                   ` Richard Cochran [this message]
2021-11-25 17:05                     ` Vladimir Oltean
2021-11-26  8:42                       ` Kurt Kanzenbach
2021-11-26 16:31                         ` Richard Cochran
2021-11-26 16:42                           ` Vladimir Oltean
2021-11-26 17:03                             ` Richard Cochran
2021-11-26 17:18                               ` Vladimir Oltean
2021-11-04 17:29 ` [PATCH 0/7] Add PTP support for BCM53128 switch Jakub Kicinski
2021-11-05 13:08   ` Martin Kaistra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211108144824.GD7170@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.kaistra@linutronix.de \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®