From: Michael Walle <michael@walle.cc>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net] net: phy: avoid clearing PHY interrupts twice in irq handler
Date: Wed, 04 Mar 2020 14:02:47 +0100 [thread overview]
Message-ID: <fbf0a7739f5c8442c1d2b0aa9aba086d@walle.cc> (raw)
In-Reply-To: <c2928823-da08-0321-6917-1481aab79e09@gmail.com>
Am 2020-03-04 13:13, schrieb Heiner Kallweit:
> On 02.03.2020 00:20, Heiner Kallweit wrote:
>> On 01.03.2020 23:52, Michael Walle wrote:
>>> Am 2020-03-01 21:36, schrieb Heiner Kallweit:
>>>> On all PHY drivers that implement did_interrupt() reading the
>>>> interrupt
>>>> status bits clears them. This means we may loose an interrupt that
>>>> is triggered between calling did_interrupt() and
>>>> phy_clear_interrupt().
>>>> As part of the fix make it a requirement that did_interrupt() clears
>>>> the interrupt.
>>>
>>> Looks good. But how would you use did_interrupt() and
>>> handle_interrupt()
>>> together? I guess you can't. At least not if handle_interrupt() has
>>> to read the pending bits again. So you'd have to handle custom
>>> interrupts in did_interrupt(). Any idea how to solve that?
>>>
>>> [I know, this is only about fixing the lost interrupts.]
>>>
>> Right, this one is meant for stable to fix the issue with the
>> potentially
>> lost interrupts. Based on it I will submit a patch for net-next that
>> tackles the issue that did_interrupt() has to read (and therefore
>> clear)
>> irq status bits and therefore makes them unusable for
>> handle_interrupt().
>> The basic idea is that did_interrupt() is called only if
>> handle_interrupt()
>> isn't implemented. handle_interrupt() has to include the did_interrupt
>> functionality. It can read the irq status once and store it in a
>> variable
>> for later use.
>>
> In case you wait for this patch to base further own work on it:
> I'm waiting for next merge of net into net-next, because my patch will
> apply cleanly only after that. This merge should happen in the next
> days.
Ok, thanks for the information. I have enough other things to do ;)
-michael
next prev parent reply other threads:[~2020-03-04 13:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 20:36 [PATCH net] net: phy: avoid clearing PHY interrupts twice in irq handler Heiner Kallweit
2020-03-01 22:52 ` Michael Walle
2020-03-01 23:20 ` Heiner Kallweit
2020-03-04 12:13 ` Heiner Kallweit
2020-03-04 13:02 ` Michael Walle [this message]
2020-03-02 3:05 ` David Miller
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=fbf0a7739f5c8442c1d2b0aa9aba086d@walle.cc \
--to=michael@walle.cc \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.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 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).