Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp571410pxb; Tue, 19 Oct 2021 08:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytDjF12opgcao9B8bFIV3+QlCb8eTQRgjO5ou/XFknO2GINKGh61PKmCG48bL7AJ/nFgO9 X-Received: by 2002:a17:90b:1804:: with SMTP id lw4mr561904pjb.174.1634657811443; Tue, 19 Oct 2021 08:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634657811; cv=none; d=google.com; s=arc-20160816; b=ftU0Min6JDCYyQr7a9MpKvaHWEIaRnFG7NhTAGMWTv6aLN9b74fzjxvnAIYidm9uBR R5ZNJIW5YoErRA7fPuUxhdt8kc/zq8wOXdcg7I/SvKfxDyjsR8DA76YBbaUxOPTMNetM U5+GFG923xsZujOdeO2UdOyNZCjwimEEqAqk/BWqUImsr/Voik/5bc0y7x6/smjClGGh fI38qMZtzMIlEoGoqKnFohFcmVsXOYorZkGISt1COzmhkCkvcvU41jgHHa6+4UNfuDoE qWjtIaYGc1rRALAkOuM6Gs4lByCJYEr8/YCtjoA6Dcq+5zOfwwkwOTfaH1UT2gBTHHkP dVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=L6c1VEaHG2YhFOn8U5T0VTfvckMA1qInTEtVwc6jgGo=; b=gwhCJE6yFVsLdrktaAXHTqKW/U6mWll/rO/IY8cAPcasEWakYeyeD9STju89NsbqcX EMbYv84VivcGTgaaKnQrwLDrZFWlhRPxcamk4eqADUYM3yYfFw71hwNmwPcRcU85CMar u6/u6n0Vm2sXop5Hd+HYhJpzYzmy6OeKlO0G0RsiLR0y1Ysja3xmHiD2ucp6SvUtIIrC t9YWZZ+ELgWga1+ip0a5YeEkBQEU+xDjokDeFspxR3R/AJLNFi2LSlD1sAWAt+ywSNsP DHFXsmfD13bJgPDlX+AxFAWQJBjsdDFvF5FVsONP6lcp5Uo3itSxyX5bN6lmeHfP1lra UYRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si8231003plf.66.2021.10.19.08.36.36; Tue, 19 Oct 2021 08:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231236AbhJSPhk convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Oct 2021 11:37:40 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:50899 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbhJSPhi (ORCPT ); Tue, 19 Oct 2021 11:37:38 -0400 Received: (Authenticated sender: kory.maincent@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 4EE0E240010; Tue, 19 Oct 2021 15:35:21 +0000 (UTC) Date: Tue, 19 Oct 2021 17:35:20 +0200 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Geert Uytterhoeven Cc: netdev , Linux-Renesas , Linux Kernel Mailing List , Thomas Petazzoni , Sergey Shtylyov , "David S. Miller" , Jakub Kicinski , Lad Prabhakar , Biju Das , Sergei Shtylyov , Andrew Lunn , Adam Ford , Yoshihiro Shimoda , Yang Yingliang Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays Message-ID: <20211019173520.0154a8cb@kmaincent-XPS-13-7390> In-Reply-To: References: <20211019145719.122751-1-kory.maincent@bootlin.com> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Geert, Thanks for the review. On Tue, 19 Oct 2021 17:13:52 +0200 Geert Uytterhoeven wrote: > > The ravb MAC is adding RX delay if RGMII_RXID is selected and TX delay > > if RGMII_TXID but that behavior is wrong. > > Indeed according to the ethernet.txt documentation the ravb configuration > > Do you mean ethernet-controller.yaml? Doh, yes, I paste the commit log from the older Kernel git and forget to change that. > > > should be inverted: > > * "rgmii-rxid" (RGMII with internal RX delay provided by the PHY, the MAC > > should not add an RX delay in this case) > > * "rgmii-txid" (RGMII with internal TX delay provided by the PHY, the MAC > > should not add an TX delay in this case) > > > > This patch inverts the behavior, i.e adds TX delay when RGMII_RXID is > > selected and RX delay when RGMII_TXID is selected. > > > > Signed-off-by: Kory Maincent > > Does this fix an actual problem for you? In fact, this fix a problem for an older 4.14 Kernel on my current project. I wanted to push my fix in the mainline kernel also, but as you say below, now this code is legacy. Does it matter to fix legacy code? > Note that in accordance with the comment above, the code section > below is only present to support old DTBs. Contemporary DTBs rely > on the now mandatory "rx-internal-delay-ps" and "tx-internal-delay-ps" > properties instead. > Hence changing this code has no effect on DTS files as supplied with > the kernel, but may have ill effects on DTB files in the field, which > rely on the current behavior. When people update the kernel version don't they update also the devicetree? Regards, Köry