From: Andrew Lunn <andrew@lunn.ch>
To: Michael Walle <michael@walle.cc>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
netdev@vger.kernel.org, Xu Liang <lxu@maxlinear.com>
Subject: Re: GPY215 PHY interrupt issue
Date: Fri, 25 Nov 2022 16:17:53 +0100 [thread overview]
Message-ID: <Y4DcoTmU3nWqMHIp@lunn.ch> (raw)
In-Reply-To: <fd1352e543c9d815a7a327653baacda7@walle.cc>
On Fri, Nov 25, 2022 at 03:44:08PM +0100, Michael Walle wrote:
> Hi,
>
> I've been debugging an issue with spurious interrupts and it turns out
> the GYP215 (possibly also other MaxLinear PHYs) has a problem with the
> link down interrupt. Although the datasheet mentions (and which common
> sense) a read of the interrupt status register will deassert the
> interrupt line, the PHY doesn't deassert it right away. There is a
> variable delay between reading the status register and the deassertion
> of the interrupt line. This only happens on a link down event. The
> actual delay depends on the firmware revision and is also somehow
> random. With FW 7.71 (on a GPY215B) I've meassured around 40us with
> FW 7.118 (GPY215B) it's about 2ms.
So you get 2ms of interrupt storm? Does the interrupt status bit clear
immediately, or does that clear only once the interrupt line itself
has cleared? I'm assuming it clears immediately, otherwise you would
add a polling loop.
> It also varies from link down to
> link down. The issue is also present in the new GPY215C revision.
> MaxLinear confirmed the issue and is currently working on a firmware
> fix. But it seems that the issue cannot really be resolved. At best,
> the delay can be minimized. If there will be a fix, this is then
> only for a GPY215C and a new firmware version.
>
> Does anyone have an idea of a viable software workaround?
Looking at the datasheet for the GPY215, the interrupt line is also
GPIO 14. Could you flip it into a GPIO, force it inactive, and sleep
to 2ms? Or even turn it into an input and see if you can read its
state and poll it until it clears?
Andrew
next prev parent reply other threads:[~2022-11-25 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 14:44 GPY215 PHY interrupt issue Michael Walle
2022-11-25 15:17 ` Andrew Lunn [this message]
2022-11-27 19:01 ` Michael Walle
2022-11-28 7:41 ` Michael Walle
2022-11-28 13:30 ` Andrew Lunn
2022-12-01 10:24 ` Michael Walle
2022-12-01 15:54 ` Andrew Lunn
2022-12-01 21:31 ` Michael Walle
2022-12-01 22:06 ` Andrew Lunn
2022-12-01 23:24 ` Michael Walle
2022-12-02 0:05 ` 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=Y4DcoTmU3nWqMHIp@lunn.ch \
--to=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux@armlinux.org.uk \
--cc=lxu@maxlinear.com \
--cc=michael@walle.cc \
--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 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).