[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWghZ7HM5RRFRsZu8P_ikna0QWoRfCKeym61N-Lv-v4Xw@mail.gmail.com>
Date: Tue, 19 Oct 2021 17:13:52 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Kory 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 Kory,
Thanks for your patch!
On Tue, Oct 19, 2021 at 4:57 PM Kory Maincent <kory.maincent@...tlin.com> wrote:
> Invert the configuration of the RGMII delay selected by RGMII_RXID and
> RGMII_TXID.
>
> 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?
> 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?
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2114,13 +2114,13 @@ static void ravb_parse_delay_mode(struct device_node *np, struct net_device *nde
> /* Fall back to legacy rgmii-*id behavior */
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.
> if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
> priv->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) {
> - priv->rxcidm = 1;
> + priv->txcidm = 1;
> priv->rgmii_override = 1;
> }
>
> if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
> priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
> - priv->txcidm = 1;
> + priv->rxcidm = 1;
> priv->rgmii_override = 1;
> }
> }
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