From: Kory Maincent <kory.maincent@bootlin.com>
To: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: 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>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Yang Yingliang <yangyingliang@huawei.com>
Subject: [PATCH] net: renesas: Fix rgmii-id delays
Date: Tue, 19 Oct 2021 16:57:17 +0200 [thread overview]
Message-ID: <20211019145719.122751-1-kory.maincent@bootlin.com> (raw)
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
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>
---
drivers/net/ethernet/renesas/ravb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 0f85f2d97b18..89cd88e5b450 100644
--- 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 */
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;
}
}
--
2.25.1
next reply other threads:[~2021-10-19 14:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 14:57 Kory Maincent [this message]
2021-10-19 15:13 ` Geert Uytterhoeven
2021-10-19 15:35 ` Köry Maincent
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=20211019145719.122751-1-kory.maincent@bootlin.com \
--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+renesas@glider.be \
--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®