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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8398DC4332F for ; Tue, 19 Oct 2021 15:35:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68F8A61074 for ; Tue, 19 Oct 2021 15:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231750AbhJSPhl convert rfc822-to-8bit (ORCPT ); Tue, 19 Oct 2021 11:37:41 -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