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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1C025C00528 for ; Wed, 2 Aug 2023 10:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W+UvCI6n+yUc/d5Us7kjk8B2ez13C5TF59BWYqcbygY=; b=4eDPXnn6DDnBz9lzbd54HtBKWc T7Kpr7KJSPmz5GAATIR6If37ClHEqNOVV+zm8VC72EexkXTs3lBlbZAN0i2T5HQnsZJue/GRnGZXa iXKE9KVpXSdGR82tbPzrdxZzGrleESmRPaKY3WU8fpV/VOwKQad48bkpSyMbUz4dU/C0tjq9dO10F o3FsuuFVt7vENp2MxOUKxRbajAZ9GEFN82KV4I/ao+5omsg9xzngpkgGCl90mW1oCcnlCglU+DswA Pwv1ckEJyLbiJedjmBIWUmwZGLDHd56oshnuFjsYRi29gEnazpLwZraT3mhNQvCOF1gqpzmANR49V HoQVG9uQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qR8op-004ZWc-18; Wed, 02 Aug 2023 10:11:03 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qR8om-004ZVe-1B for linux-arm-kernel@lists.infradead.org; Wed, 02 Aug 2023 10:11:02 +0000 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690971052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O3flfNg7D3xDoacIyuCI9Tv6Ia0JzLVFeGS0pO9j6hc=; b=lCcwn+4dDNiakaikCPd2NRCJcwoRItNDzrmThzLoywqqDYp7HfD1V9RNpnqmN11+0wX23O do0T01D47qno0jZQbT2Aynk7OqfhvuqBKeW0KMajE8HH25docPlL9J++RyfSfxwjoVW9K0 EAfwd5jFfATDzdIiVx3u9Lm9zeQJbK+ZToxlVi3qUMUduOCeYOhno3JRa1xlh8iwFtMNpV srZP6R/k+Z79S7rqpq1tPbEJymDc7WXJgWJz1t3V/TpxgF29bsp7QyfgqMH5zY8ZwHZYL5 cz2A724eTdfIHGmV3FiA7mLpnP3w+BsiViM31XMknAplqhHwpg2hlrsSl4mV/g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690971052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O3flfNg7D3xDoacIyuCI9Tv6Ia0JzLVFeGS0pO9j6hc=; b=AA0b0nIT91SHfhSeCVwZv1JCnRBTwk9kar1m+JPxGBdwU5gHLHVW0umEXE6SihZK0R4R2X YM5YnK1Esun1x2CA== To: Johannes Zink , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , Russell King Cc: patchwork-jzi@pengutronix.de, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, kernel test robot , Johannes Zink Subject: Re: [PATCH v3 0/2] net: stmmac: correct MAC propagation delay In-Reply-To: <20230719-stmmac_correct_mac_delay-v3-0-61e63427735e@pengutronix.de> References: <20230719-stmmac_correct_mac_delay-v3-0-61e63427735e@pengutronix.de> Date: Wed, 02 Aug 2023 12:10:51 +0200 Message-ID: <87fs51kb4k.fsf@kurt> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230802_031100_718654_29BAA505 X-CRM114-Status: GOOD ( 15.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5465646423279238136==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5465646423279238136== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain On Tue Aug 01 2023, Johannes Zink wrote: > --- > Changes in v3: > - work in Richard's review feedback. Thank you for reviewing my patch: > - as some of the hardware may have no or invalid correction value > registers: introduce feature switch which can be enabled in the glue > code drivers depending on the actual hardware support > - only enable the feature on the i.MX8MP for the time being, as the patch > improves timing accuracy and is tested for this hardware > - Link to v2: https://lore.kernel.org/r/20230719-stmmac_correct_mac_delay-v2-1-3366f38ee9a6@pengutronix.de > > Changes in v2: > - fix builds for 32bit, this was found by the kernel build bot > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202307200225.B8rmKQPN-lkp@intel.com/ > - while at it also fix an overflow by shifting a u32 constant from macro by 10bits > by casting the constant to u64 > - Link to v1: https://lore.kernel.org/r/20230719-stmmac_correct_mac_delay-v1-1-768aa4d09334@pengutronix.de > > --- > Johannes Zink (2): > net: stmmac: correct MAC propagation delay > net: stmmac: dwmac-imx: enable MAC propagation delay correction for i.MX8MP Tested on imx8mp <-> TSN Switch <-> x86 with i225: Before your patch: |ptp4l -i eth0 -f configs/gPTP.cfg --summary_interval=5 -m |ptp4l[139.274]: rms 9 max 27 freq +29264 +/- 13 delay 347 +/- 2 |ptp4l[171.279]: rms 10 max 24 freq +29257 +/- 13 delay 344 +/- 2 |ptp4l[203.283]: rms 10 max 24 freq +29254 +/- 13 delay 347 +/- 2 |ptp4l[235.288]: rms 9 max 24 freq +29255 +/- 13 delay 346 +/- 1 |ptp4l[267.292]: rms 9 max 28 freq +29257 +/- 13 delay 347 +/- 2 After: |ptp4l -i eth0 -f configs/gPTP.cfg --summary_interval=5 -m |ptp4l[214.186]: rms 9 max 29 freq +28868 +/- 16 delay 326 +/- 2 |ptp4l[246.190]: rms 8 max 22 freq +28902 +/- 15 delay 329 +/- 2 |ptp4l[278.194]: rms 9 max 24 freq +28930 +/- 15 delay 325 +/- 1 |ptp4l[310.199]: rms 9 max 25 freq +28956 +/- 15 delay 327 +/- 3 |ptp4l[342.203]: rms 9 max 27 freq +28977 +/- 14 delay 327 +/- 1 And the derived register values: |[ 15.864016] KURT: PTP_TS_INGR_CORR_NS: 3147483248 PTP_TS_INGR_CORR_SNS: 0 |[ 15.870862] KURT: PTP_TS_EGR_CORR_NS: 400 PTP_TS_EGR_CORR_SNS: 0 |[ 20.000962] KURT: PTP_TS_INGR_CORR_NS: 3147483636 PTP_TS_INGR_CORR_SNS: 0 |[ 20.007809] KURT: PTP_TS_EGR_CORR_NS: 12 PTP_TS_EGR_CORR_SNS: 0 So, seems to work: Tested-by: Kurt Kanzenbach # imx8mp Thanks, Kurt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCgAxFiEEvLm/ssjDfdPf21mSwZPR8qpGc4IFAmTKK6sTHGt1cnRAbGlu dXRyb25peC5kZQAKCRDBk9HyqkZzgpH7D/9gvmG6+n49HSx1HFttoXKOeJBVJJO2 BD3+idE7X5Uq6p5FErWUWpOgLRSYMrNTXYO3V/Z+MAaFoxiPm/mjnW0d5Angr2Hu 8OW/krHNG8eupFVzJ7zVmdtY9Ct1bkcUCdOb6YEP53YMqbgnFogzrXL1Ym9PDuKL DcZjC4fLYZbpS+sqqEt7nPfHk6fWaSpGzLb7XsMFfH+xBQN4sA3XblSY9dmmiL98 gNvCPkbpk6pRKwDpM46xefREyBOiocRbgtxbubuSI2t2858EbONQmam394axk52J qc/zf4LxGfAia8gtqtSqEMK+l4Xd3kkb1bKX1fFoZc2TLZExQDDUNC6UjAZwAl0n TMWi4g+qDKDFAcyszh3EQtRFx0LPj/HLmX9u9WTCt7DOP9MgKlNwMNuppTO6GT// yAw+0QYNyEebvge0z/ZkVn+zNZXCMSLyskkaa/CC4p9pjfp/IuUJyUhfnDIL+Svn 2WoB2IU7AqKPDAeVJI/rx8LNftu8KgAL1Z7SKOYpW42nWPv7wH17W3hgil56YTk6 mzAyIHWu90aFePMXrLrbPHoAdGJiHxLHIiwjkzzowInj7Pk/QiplYYtUaCJAZioh NMWO3PBMVdGInW6ys9pZsDSf8MI3diR2aU7g02k7A666pCrx1ugCaYnx9cks59cv 18dkcDquyqvDMA== =4fSs -----END PGP SIGNATURE----- --=-=-=-- --===============5465646423279238136== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5465646423279238136==--