lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXWhK_kEKFuXFUO45w6UaA1KL6F8RX4gwkavBMXQZ4mAw@mail.gmail.com>
Date:   Tue, 19 Oct 2021 17:44:08 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Köry Maincent <kory.maincent@...tlin.com>
Cc:     netdev <netdev@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Biju Das <biju.das.jz@...renesas.com>,
        Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Andrew Lunn <andrew@...n.ch>, Adam Ford <aford173@...il.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Yang Yingliang <yangyingliang@...wei.com>
Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays

Hi Köry,

On Tue, Oct 19, 2021 at 5:35 PM Köry Maincent <kory.maincent@...tlin.com> wrote:
> On Tue, 19 Oct 2021 17:13:52 +0200
> Geert Uytterhoeven <geert@...ux-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
> > > 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@...tlin.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?

I don't think so.  If you're stuck on v4.14, you may want to backport
commit a6f51f2efa742df0 ("ravb: Add support for explicit internal
clock delay configuration").  However, you have to be careful, as
it interacts with related changes to PHY drivers, as explained in
that commit.

> > 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?

I hope they do ;-)
But we do our best to preserve backwards-compatibility with old DTBS.
If you change behavior of v4.14, it may actually introduce
backwards-incompatibility we're not aware of, as the behavior you
started to rely on never existed in mainline.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ