mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH v1 1/1] net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver
Date: Tue, 20 Jun 2023 21:33:16 +0200	[thread overview]
Message-ID: <f2772f0f-31a4-41ba-b1ea-bfe3e5bdc87f@lunn.ch> (raw)
In-Reply-To: <20230620125505.2402497-1-o.rempel@pengutronix.de>

On Tue, Jun 20, 2023 at 02:55:05PM +0200, Oleksij Rempel wrote:
> Fix an issue where the kernel would stall during netboot, showing the
> "sched: RT throttling activated" message. This stall was triggered by
> the behavior of the mii_interrupt bit (Bit 7 - DP83TD510E_STS_MII_INT)
> in the DP83TD510E's PHY_STS Register (Address = 0x10). The DP83TD510E
> datasheet (2020) states that the bit clears on write, however, in
> practice, the bit clears on read.
> 
> This discrepancy had significant implications on the driver's interrupt
> handling. The PHY_STS Register was used by handle_interrupt() to check
> for pending interrupts and by read_status() to get the current link
> status. The call to read_status() was unintentionally clearing the
> mii_interrupt status bit without deasserting the IRQ pin, causing
> handle_interrupt() to miss other pending interrupts. This issue was most
> apparent during netboot.
> 
> The fix refrains from using the PHY_STS Register for interrupt handling.
> Instead, we now solely rely on the INTERRUPT_REG_1 Register (Address =
> 0x12) and INTERRUPT_REG_2 Register (Address = 0x13) for this purpose.
> These registers directly influence the IRQ pin state and are latched
> high until read.
> 
> Note: The INTERRUPT_REG_2 Register (Address = 0x13) exists and can also
> be used for interrupt handling, specifically for "Aneg page received
> interrupt" and "Polarity change interrupt". However, these features are
> currently not supported by this driver.
> 
> Fixes: 165cd04fe253 ("net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

It would be good to add a Cc: <stable@vger.kernel.org>. It will
probably get back ported with it, but the process does require it.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

      reply	other threads:[~2023-06-20 19:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 12:55 Oleksij Rempel
2023-06-20 19:33 ` Andrew Lunn [this message]

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=f2772f0f-31a4-41ba-b1ea-bfe3e5bdc87f@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.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®