Re: [PATCH] net: renesas: Fix rgmii-id delays

Köry Maincent
2021-10-19T15:35:30Z

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