mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Köry Maincent" <kory.maincent@bootlin.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: netdev <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Adam Ford <aford173@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Yang Yingliang <yangyingliang@huawei.com>
Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays
Date: Tue, 19 Oct 2021 17:35:20 +0200	[thread overview]
Message-ID: <20211019173520.0154a8cb@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <CAMuHMdWghZ7HM5RRFRsZu8P_ikna0QWoRfCKeym61N-Lv-v4Xw@mail.gmail.com>

Hello Geert,

Thanks for the review.

On Tue, 19 Oct 2021 17:13:52 +0200
Geert Uytterhoeven <geert@linux-m68k.org> 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 <kory.maincent@bootlin.com>  
> 
> 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

  reply	other threads:[~2021-10-19 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 14:57 Kory Maincent
2021-10-19 15:13 ` Geert Uytterhoeven
2021-10-19 15:35   ` Köry Maincent [this message]
2021-10-19 15:41     ` Andrew Lunn
2021-10-19 15:57       ` Thomas Petazzoni
2021-10-19 20:05         ` Geert Uytterhoeven
2021-10-20  8:53           ` Köry Maincent
2021-10-20  9:05             ` Geert Uytterhoeven
2021-10-20 12:16             ` Andrew Lunn
2021-10-19 15:44     ` Geert Uytterhoeven
2021-10-19 15:47 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211019173520.0154a8cb@kmaincent-XPS-13-7390 \
    --to=kory.maincent@bootlin.com \
    --cc=aford173@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=s.shtylyov@omp.ru \
    --cc=sergei.shtylyov@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yangyingliang@huawei.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®