From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0BB2C282EC for ; Tue, 18 Mar 2025 14:07:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7773280D1B; Tue, 18 Mar 2025 14:07:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mHvWrECBJYTR; Tue, 18 Mar 2025 14:07:08 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C208580D2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1742306828; bh=f1akVtA8rMMDhUwSFGTZZ51RQmpHNhw/SKl+u1Azh5g=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hS099Dlg3QF/Cc2yQsqKGzUTdjlTKZHJQLb5GBGNQdAzSfZT6kfCo9hcJ3685Bbv4 yLeMp/mcMx8ucRTno1YUGeMUBB2fxiQEVZWKCPGKkJzYll/HVUEQmPggzBrNMU8hzZ 7Jk9yuenvuE+s6RcvO6IJMWl9Lb22uKGysaWYV5ZafnPoSgWO/ldk0MhAOqe9gA/LD fQWDUuNiQbT1m/zHaU0mEr3OMsXc8GhQ/Jw6CFA74TApMl+GK/9X16GPONtSGm8Xh3 RHArhJR/vj5bIZOBYc/iDbk1mv9drYnCJFbHg5WgMXX7UA6mC6tcFj0p4ZNHo2Kxg1 hdAmMmmotJBNA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id C208580D2A; Tue, 18 Mar 2025 14:07:08 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 5C1F5D5 for ; Tue, 18 Mar 2025 14:07:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 410B740580 for ; Tue, 18 Mar 2025 14:07:07 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id fotxg7qd6UIj for ; Tue, 18 Mar 2025 14:07:06 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=147.75.193.91; helo=nyc.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 4F7E9409A7 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4F7E9409A7 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4F7E9409A7 for ; Tue, 18 Mar 2025 14:07:06 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 26EECA45F0B; Tue, 18 Mar 2025 14:01:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B519EC4AF09; Tue, 18 Mar 2025 14:06:59 +0000 (UTC) Date: Tue, 18 Mar 2025 14:06:57 +0000 From: Simon Horman To: Jacob Keller Cc: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Ruud Bos , Paul Barker , Niklas =?utf-8?Q?S=C3=B6derlund?= , Bryan Whitehead , UNGLinuxDriver@microchip.com, Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , Jonathan Lemon , Lasse Johnsen , Vadim Fedorenko , Michal Swiatkowski , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org Message-ID: <20250318140657.GV688833@kernel.org> References: <20250312-jk-net-fixes-supported-extts-flags-v2-0-ea930ba82459@intel.com> <20250312-jk-net-fixes-supported-extts-flags-v2-1-ea930ba82459@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250312-jk-net-fixes-supported-extts-flags-v2-1-ea930ba82459@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742306824; bh=x+ln5AfDExf7TBvKk6FVfaJvANPiM17BmFZInPNzSpg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FKHM9POv4Gf+HtL0UXHmuYb/RxiVCglZ02a6atCv6JB2Q+j0tBiztjw90Sp5vxiMH bwt2waGkGiqMbEHLpToBOejy6Hd6JK2sIywntO6H6yKqrF2vtAwQyF2inFd42BX8Pd CPAbH0a43AOuHLVimgnBW8xxk/YPvP/JrXl/h3KtZs4ZTW5rerYGbpEUzxbEYfml5F a1WJfVdimDvGl4RgsRlLvhTS8UsQCV7UwLoWzTYIiTtwoeVayiqFokEcqnd+eEsGBl IuMec359zCbBG3KHPIC8sKyY4fp9fvHIVlKM8nDZgVO8LDlDdfn3X6o0/FWPgmhNt6 MFmGxpDYPILsA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=FKHM9POv Subject: Re: [Intel-wired-lan] [PATCH net v2 1/5] igb: reject invalid external timestamp requests for 82580-based HW X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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 > Signed-off-by: Jacob Keller Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E213E14A8B; Tue, 18 Mar 2025 14:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742306825; cv=none; b=BsBJHA7k/5Y2eSIRIMatnM/WJOkFHdt8MWDqIVImU2X7zlDc4MTDROHxF2t9fNEW/EKNn0POERadXkJ6ihDHsIoywIsYQQvAZBx8ZzVBaKSoyv9POv+BDmCuCn+NyOSTWJprY+8fdGmHDcWKsKbMGTaX/rEyHC0xQd2LFINmANc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742306825; c=relaxed/simple; bh=x+ln5AfDExf7TBvKk6FVfaJvANPiM17BmFZInPNzSpg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a1Jh9f0sMpzc0ejrnOFr2/UcyWqF3dmfnVn3zCaOZMrMSyZdHnJ6f3nJJ0Y2J3MNHHAqngMecgWNqwu6sbu7QHjdFIRWHvcYeFilILWZdL4QXvHNCEV5IML3ddN2AodNMDuQYZ5sU89SH70cDxYqiQpxivC5bqKfaH6RI9ma4nA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FKHM9POv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FKHM9POv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B519EC4AF09; Tue, 18 Mar 2025 14:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742306824; bh=x+ln5AfDExf7TBvKk6FVfaJvANPiM17BmFZInPNzSpg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FKHM9POv4Gf+HtL0UXHmuYb/RxiVCglZ02a6atCv6JB2Q+j0tBiztjw90Sp5vxiMH bwt2waGkGiqMbEHLpToBOejy6Hd6JK2sIywntO6H6yKqrF2vtAwQyF2inFd42BX8Pd CPAbH0a43AOuHLVimgnBW8xxk/YPvP/JrXl/h3KtZs4ZTW5rerYGbpEUzxbEYfml5F a1WJfVdimDvGl4RgsRlLvhTS8UsQCV7UwLoWzTYIiTtwoeVayiqFokEcqnd+eEsGBl IuMec359zCbBG3KHPIC8sKyY4fp9fvHIVlKM8nDZgVO8LDlDdfn3X6o0/FWPgmhNt6 MFmGxpDYPILsA== Date: Tue, 18 Mar 2025 14:06:57 +0000 From: Simon Horman To: Jacob Keller Cc: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Ruud Bos , Paul Barker , Niklas =?utf-8?Q?S=C3=B6derlund?= , Bryan Whitehead , UNGLinuxDriver@microchip.com, Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , Jonathan Lemon , Lasse Johnsen , Vadim Fedorenko , Michal Swiatkowski , 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 Message-ID: <20250318140657.GV688833@kernel.org> References: <20250312-jk-net-fixes-supported-extts-flags-v2-0-ea930ba82459@intel.com> <20250312-jk-net-fixes-supported-extts-flags-v2-1-ea930ba82459@intel.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > Signed-off-by: Jacob Keller Reviewed-by: Simon Horman