All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
	"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	"Ruud Bos" <kernel.hbk@gmail.com>,
	"Paul Barker" <paul.barker.ct@bp.renesas.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Bryan Whitehead" <bryan.whitehead@microchip.com>,
	UNGLinuxDriver@microchip.com,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Lasse Johnsen" <l@ssejohnsen.me>,
	"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
	"Michal Swiatkowski" <michal.swiatkowski@linux.intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH net v2 1/5] igb: reject invalid external timestamp requests for 82580-based HW
Date: Tue, 18 Mar 2025 14:06:57 +0000	[thread overview]
Message-ID: <20250318140657.GV688833@kernel.org> (raw)
In-Reply-To: <20250312-jk-net-fixes-supported-extts-flags-v2-1-ea930ba82459@intel.com>

On Wed, Mar 12, 2025 at 03:15:50PM -0700, Jacob Keller wrote:
> The igb_ptp_feature_enable_82580 function correctly checks that unknown
> flags are not passed to the function. However, it does not actually check
> PTP_RISING_EDGE or PTP_FALLING_EDGE when configuring the external timestamp
> function.
> 
> The data sheet for the 82580 product says:
> 
>   Upon a change in the input level of one of the SDP pins that was
>   configured to detect Time stamp events using the TSSDP register, a time
>   stamp of the system time is captured into one of the two auxiliary time
>   stamp registers (AUXSTMPL/H0 or AUXSTMPL/H1).
> 
>   For example to define timestamping of events in the AUXSTMPL0 and
>   AUXSTMPH0 registers, Software should:
> 
>   1. Set the TSSDP.AUX0_SDP_SEL field to select the SDP pin that detects
>      the level change and set the TSSDP.AUX0_TS_SDP_EN bit to 1.
> 
>   2. Set the TSAUXC.EN_TS0 bit to 1 to enable timestamping
> 
> The same paragraph is in the i350 and i354 data sheets.
> 
> The wording implies that the time stamps are captured at any level change.
> There does not appear to be any way to only timestamp one edge of the
> signal.
> 
> Reject requests which do not set both PTP_RISING_EDGE and PTP_FALLING_EDGE
> when operating under PTP_STRICT_FLAGS mode via PTP_EXTTS_REQUEST2.
> 
> Fixes: 38970eac41db ("igb: support EXTTS on 82580/i354/i350")
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
	"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	"Ruud Bos" <kernel.hbk@gmail.com>,
	"Paul Barker" <paul.barker.ct@bp.renesas.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Bryan Whitehead" <bryan.whitehead@microchip.com>,
	UNGLinuxDriver@microchip.com,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Jonathan Lemon" <jonathan.lemon@gmail.com>,
	"Lasse Johnsen" <l@ssejohnsen.me>,
	"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
	"Michal Swiatkowski" <michal.swiatkowski@linux.intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH net v2 1/5] igb: reject invalid external timestamp requests for 82580-based HW
Date: Tue, 18 Mar 2025 14:06:57 +0000	[thread overview]
Message-ID: <20250318140657.GV688833@kernel.org> (raw)
In-Reply-To: <20250312-jk-net-fixes-supported-extts-flags-v2-1-ea930ba82459@intel.com>

On Wed, Mar 12, 2025 at 03:15:50PM -0700, Jacob Keller wrote:
> The igb_ptp_feature_enable_82580 function correctly checks that unknown
> flags are not passed to the function. However, it does not actually check
> PTP_RISING_EDGE or PTP_FALLING_EDGE when configuring the external timestamp
> function.
> 
> The data sheet for the 82580 product says:
> 
>   Upon a change in the input level of one of the SDP pins that was
>   configured to detect Time stamp events using the TSSDP register, a time
>   stamp of the system time is captured into one of the two auxiliary time
>   stamp registers (AUXSTMPL/H0 or AUXSTMPL/H1).
> 
>   For example to define timestamping of events in the AUXSTMPL0 and
>   AUXSTMPH0 registers, Software should:
> 
>   1. Set the TSSDP.AUX0_SDP_SEL field to select the SDP pin that detects
>      the level change and set the TSSDP.AUX0_TS_SDP_EN bit to 1.
> 
>   2. Set the TSAUXC.EN_TS0 bit to 1 to enable timestamping
> 
> The same paragraph is in the i350 and i354 data sheets.
> 
> The wording implies that the time stamps are captured at any level change.
> There does not appear to be any way to only timestamp one edge of the
> signal.
> 
> Reject requests which do not set both PTP_RISING_EDGE and PTP_FALLING_EDGE
> when operating under PTP_STRICT_FLAGS mode via PTP_EXTTS_REQUEST2.
> 
> Fixes: 38970eac41db ("igb: support EXTTS on 82580/i354/i350")
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-03-18 14:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 22:15 [Intel-wired-lan] [PATCH net v2 0/5] net: ptp: fix egregious supported flag checks Jacob Keller
2025-03-12 22:15 ` Jacob Keller
2025-03-12 22:15 ` [Intel-wired-lan] [PATCH net v2 1/5] igb: reject invalid external timestamp requests for 82580-based HW Jacob Keller
2025-03-12 22:15   ` Jacob Keller
2025-03-18 14:06   ` Simon Horman [this message]
2025-03-18 14:06     ` Simon Horman
2025-03-12 22:15 ` [Intel-wired-lan] [PATCH net v2 2/5] renesas: reject PTP_STRICT_FLAGS as unsupported Jacob Keller
2025-03-12 22:15   ` Jacob Keller
2025-03-13  9:45   ` [Intel-wired-lan] " Niklas Söderlund
2025-03-13  9:45     ` Niklas Söderlund
2025-03-18 14:07   ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:07     ` Simon Horman
2025-03-12 22:15 ` [Intel-wired-lan] [PATCH net v2 3/5] net: lan743x: reject unsupported external timestamp requests Jacob Keller
2025-03-12 22:15   ` Jacob Keller
2025-03-18 14:08   ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:08     ` Simon Horman
2025-03-12 22:15 ` [Intel-wired-lan] [PATCH net v2 4/5] broadcom: fix supported flag check in periodic output function Jacob Keller
2025-03-12 22:15   ` Jacob Keller
2025-03-18 14:09   ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:09     ` Simon Horman
2025-03-12 22:15 ` [Intel-wired-lan] [PATCH net v2 5/5] ptp: ocp: reject unsupported periodic output flags Jacob Keller
2025-03-12 22:15   ` Jacob Keller
2025-03-18 14:10   ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:10     ` Simon Horman
2025-03-19 21:21 ` [Intel-wired-lan] [PATCH net v2 0/5] net: ptp: fix egregious supported flag checks Paolo Abeni
2025-03-19 21:21   ` Paolo Abeni
2025-03-19 23:56   ` [Intel-wired-lan] " Jacob Keller
2025-03-19 23:56     ` Jacob Keller
2025-03-20  8:20 ` [Intel-wired-lan] " patchwork-bot+netdevbpf
2025-03-20  8:20   ` patchwork-bot+netdevbpf

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=20250318140657.GV688833@kernel.org \
    --to=horms@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernel.hbk@gmail.com \
    --cc=kuba@kernel.org \
    --cc=l@ssejohnsen.me \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.