Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4062907rwb; Mon, 31 Jul 2023 00:03:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOSr5XirxsoaWd8d4dSQLWAGkhFEVAt8ohJZbYBCKO87wI0Zy4wbbhNLhPUWhMk/p82c+G X-Received: by 2002:a2e:8912:0:b0:2b4:83c3:d285 with SMTP id d18-20020a2e8912000000b002b483c3d285mr5784852lji.38.1690787015772; Mon, 31 Jul 2023 00:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690787015; cv=none; d=google.com; s=arc-20160816; b=wSU+GMo77w8on7WQnO/vCKXbNmCDeSHUVxgolCeWA8fS3K41LB3W2U+7l+PnckDgSJ oFXS9Q+9thJtTZcuRkiS8cNhKNt/qLkJ/AeVVUZQD82PzW1Ujx2bcoigNSUsIh6Q8yXg sx3R2z9+XlpDqnsLkwWd3Hp5zFe7/4VXMjZup/biW0C2rRNPWoSnrI8Sr5eMSE5k13ji b8DkY61/e1xPWAn14mArYm4rPTxKZHE96WdbJo7wyJozNfgKPmsLba6VAUgaMzcZgun/ PTvW1XHpN4xm7m59OeCSrzBA4AAcqn4J0vlcfejy183tKAxV1qwjK9EF85aJ1gEqFgfG jXyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=O22GB3Nc/+j5kG+wwkjd0/CjgEAcvOG9zlBY+IimhDE=; fh=Eax5s2Hpvo9Z8QzkxmTm/e/rGEKscET66iMhiOPCFyg=; b=MCZAquVdL4U5bmyKsuyinkzBCByujClpJApwd15SeMqx7ZNyKz1bBh1PgOYLgUhDFG vezL0CZ0zgrYqvc/Mp9ec+eNUXiLoScvBoFrIUJyxgOJA6O3oZG/AVDSFs/+YSqz8LX7 /qiuTyeS1ATH85L7xCScTvdwyptUlkp+THmcRNWoFrCPOJKPdDdh5nxldBs7mF+T1z1J Jm0o63fTDrE5d6MF20wRisd1dDRIJe13J54c0r+FOvZ0sEVNF2UI6kRZoCxNQ7+/7Vg2 umz9ydBaHUC/hLZKYwnIf9c5KU9sfFEjfaF3A3ueVQq3wPRsr79HhmxoaOLA3ivZ7V9c C+qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br11-20020a170906d14b00b0099364d9f0easi1472731ejb.479.2023.07.31.00.03.11; Mon, 31 Jul 2023 00:03:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbjGaHA6 (ORCPT + 99 others); Mon, 31 Jul 2023 03:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbjGaHA5 (ORCPT ); Mon, 31 Jul 2023 03:00:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 299C2185 for ; Mon, 31 Jul 2023 00:00:56 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qQMtS-0004SZ-1N; Mon, 31 Jul 2023 09:00:38 +0200 Message-ID: Date: Mon, 31 Jul 2023 09:00:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH v2] net: stmmac: correct MAC propagation delay Content-Language: en-US, de-DE To: Richard Cochran Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Russell King , 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 References: <20230719-stmmac_correct_mac_delay-v2-1-3366f38ee9a6@pengutronix.de> <729dd79e-83aa-0237-1edd-1662a6ae28cd@pengutronix.de> From: Johannes Zink In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: j.zink@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On 7/27/23 15:36, Richard Cochran wrote: > On Thu, Jul 27, 2023 at 09:20:10AM +0200, Johannes Zink wrote: >> Hi Richard, >> >> On 7/26/23 22:57, Richard Cochran wrote: >>> On Mon, Jul 24, 2023 at 12:01:31PM +0200, Johannes Zink wrote: >>> >>> Earlier versions of the IP core return zero from these... >>> >>>> +#define PTP_TS_INGR_LAT 0x68 /* MAC internal Ingress Latency */ >>>> +#define PTP_TS_EGR_LAT 0x6c /* MAC internal Egress Latency */ >>> >> >> good catch. Gonna send a v3 with a check to and set the values for dwmac v5 only. > > AFAICT there is no feature bit that indicates the presence or absence > of these two registers. > > Are you sure that *all* v5 IP cores have these? > > I am not sure. I cannot tell for sure either, since I have datasheets for the i.MX8MP only. Maybe Kurt has some insights here, as he has additional hardware available for testing? Nevertheless, I am going to add a guard to only use the correction codepath on i.MX8MP in v3 for the time being, we can add other hardware later trivially if they support doing this. Best regards Johannes > > Thanks, > Richard > > -- Pengutronix e.K. | Johannes Zink | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 |