From: Andrew Lunn <andrew@lunn.ch>
To: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: Russell King <linux@armlinux.org.uk>,
netdev <netdev@vger.kernel.org>,
fugang.duan@nxp.com, Chris Healy <cphealy@gmail.com>
Subject: Re: FEC MDIO timeout and polled IO
Date: Fri, 25 Mar 2022 16:17:13 +0100 [thread overview]
Message-ID: <Yj3c+cDzdvsUbYtp@lunn.ch> (raw)
In-Reply-To: <20220325140808.GA1047855@francesco-nb.int.toradex.com>
On Fri, Mar 25, 2022 at 03:08:08PM +0100, Francesco Dolcini wrote:
> Hello Andrew and all,
> I was recently debugging an issue in the FEC driver, about 2% of the
> time the driver is failing with "MDIO read timeout" at boot on a 5.4
> kernel.
>
> This issue is not new and from time to time appear again, it seems that
> the previous interrupt based mechanism is somehow easy to break.
>
> I backported your patch
> f166f890c8f0 (net: ethernet: fec: Replace interrupt driven MDIO with polled IO, 2020-05-02)
> to kernel 5.4 and it seems that it fixes the issue (I was able to do 470
> power cycles, while before it was failing after a couple of hundreds
> cycles best case).
>
> Shouldn't this patch be backported to kernel 5.4?
Hi Francesco
This patch was purely a performance boost, it was not a bug fix in any
way. That change also caused a lot of pain. There are at least two
different implementations of the MDIO bus in the FEC, and they
behaviour slightly differently. So what worked for me with the Vybrid
broke some other platforms. It took an NXP software engineer talking
to there hardware guys to figure out how to do this correctly. Which
is why you will see a complicated patch history.
I personally would not recommend a back port, unless you can test the
back port on a wide range of SoC with the FEC.
If you are getting timeouts, i would suggest you look at whatever else
is happening in the system during boot. Are interrupts getting
disabled for too long? Is something blocking the running of the
completion?
Or just update to v5.15.
Andrew
next prev parent reply other threads:[~2022-03-25 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 14:08 FEC MDIO timeout and polled IO Francesco Dolcini
2022-03-25 15:17 ` Andrew Lunn [this message]
2022-03-25 15:33 ` Francesco Dolcini
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=Yj3c+cDzdvsUbYtp@lunn.ch \
--to=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=fugang.duan@nxp.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.