netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Köry Maincent" <kory.maincent@bootlin.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	netdev <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	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>,
	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: Wed, 20 Oct 2021 14:16:55 +0200	[thread overview]
Message-ID: <YXAIt3TOaCiEuHSt@lunn.ch> (raw)
In-Reply-To: <20211020105328.411a712f@kmaincent-XPS-13-7390>

> > BTW, it's still not clear to me why the inversion would be needed.
> > Cfr. Andrew's comment:
> > 
> > | So with rgmii-rxid, what is actually passed to the PHY? Is your
> > | problem you get twice the delay in one direction, and no delay in the
> > | other?
> 
> Yes, it was the problem I got.
> The PHY I use have RX delay enabled by default, currently the PHY driver does
> not support delay configuration, therefore I let the MAC handle TX delay. I
> have stumbling over that legacy/wrong DTS on the old Kernel.

This is where we get into the horrible mess of RGMII delays.

The real solution is to fix the PHY driver. If it is asked to do
rgmii, but is actually doing rgmii-id, the PHY driver is broken. It
either should do what it is told, or return -EINVAL/-EOPNOTSUPP etc to
indicate it does not support what it is asked to do.

But fixing things like this often breaks working systems, because the
DT says rgmii, the PHY actually does rgmii-id, the board works, until
the PHY is fixed to do what it is told, and all the bugs in the DT
suddenly come to light.

Now, you said you are using an old kernel. So it could be we have
already fixed this, and had the pain of fixing broken DT. Please look
at the current kernel PHY driver, and see if all you need to do is
back port some PHY fixes, or better still, throw away your old kernel
and use a modern one.

       Andrew

  parent reply	other threads:[~2021-10-20 12:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 14:57 [PATCH] net: renesas: Fix rgmii-id delays Kory Maincent
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 [this message]
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=YXAIt3TOaCiEuHSt@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=aford173@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=kory.maincent@bootlin.com \
    --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;
as well as URLs for NNTP newsgroup(s).