All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Wilfred Mallawa" <wilfred.mallawa@wdc.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	James Le Cuirot <chewi@gentoo.org>,
	stable@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] PCI: dw-rockchip: Clear stale link down interrupt before unmasking it
Date: Thu, 3 Dec 2026 14:06:23 +0100	[thread overview]
Message-ID: <axFpTwBnyAb4Otuc@ryzen> (raw)
In-Reply-To: <20261123121217.1107902-2-cassel@kernel.org>

On Mon, Nov 23, 2026 at 01:12:17PM +0100, Niklas Cassel wrote:
> PCIE_LINK_REQ_RST_NOT_INT is set by smlh_req_rst_not, which according to
> the RK3568 TRM "is asserted after power-on reset until first link up".
> The bit is thus already pending when the driver unmasks the interrupt
> after resetting the controller, both in probe and in .reset_root_port(),
> so the interrupt fires as soon as it is unmasked, even though the link
> is up. Since each recovery resets the controller again, this results in
> an endless loop, as seen on a Quartz64 Model B (RK3566):
> 
>   pcieport 0000:00:00.0: Recovering Root Port due to Link Down
>   pcieport 0000:00:00.0: Root Port has been reset
>   pcieport 0000:00:00.0: AER: device recovery successful
>   pcieport 0000:00:00.0: Recovering Root Port due to Link Down
> 
> Clear the bit before unmasking the interrupt, and in .reset_root_port()
> only unmask it once the link is back up, like in probe. Also keep the
> interrupt masked while .reset_root_port() resets the controller, so the
> link down caused by the reset itself is not reported.
> 
> Fixes: b376b3ff9cb0 ("PCI: dw-rockchip: Implement .reset_root_port() and use for link down")
> Reported-by: James Le Cuirot <chewi@gentoo.org>
> Closes: https://lore.kernel.org/linux-pci/08cc96c5171fc969b074371692e6d95d46eba60b.camel@gentoo.org/
> Cc: stable@vger.kernel.org
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

(snip)

> base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f


Ping on this patch, since it is a recent regression, it is targeting the
current release 7.4 and is based on v7.4-rc4.

Looking at the changes in pci/for-next, I think there might be conflicts
if you try to queue it for the next release instead of the current release.


Kind regards,
Niklas

WARNING: multiple messages have this Message-ID (diff)
From: Niklas Cassel <cassel@kernel.org>
To: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Wilfred Mallawa" <wilfred.mallawa@wdc.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	James Le Cuirot <chewi@gentoo.org>,
	stable@vger.kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] PCI: dw-rockchip: Clear stale link down interrupt before unmasking it
Date: Thu, 3 Dec 2026 14:06:23 +0100	[thread overview]
Message-ID: <axFpTwBnyAb4Otuc@ryzen> (raw)
In-Reply-To: <20261123121217.1107902-2-cassel@kernel.org>

On Mon, Nov 23, 2026 at 01:12:17PM +0100, Niklas Cassel wrote:
> PCIE_LINK_REQ_RST_NOT_INT is set by smlh_req_rst_not, which according to
> the RK3568 TRM "is asserted after power-on reset until first link up".
> The bit is thus already pending when the driver unmasks the interrupt
> after resetting the controller, both in probe and in .reset_root_port(),
> so the interrupt fires as soon as it is unmasked, even though the link
> is up. Since each recovery resets the controller again, this results in
> an endless loop, as seen on a Quartz64 Model B (RK3566):
> 
>   pcieport 0000:00:00.0: Recovering Root Port due to Link Down
>   pcieport 0000:00:00.0: Root Port has been reset
>   pcieport 0000:00:00.0: AER: device recovery successful
>   pcieport 0000:00:00.0: Recovering Root Port due to Link Down
> 
> Clear the bit before unmasking the interrupt, and in .reset_root_port()
> only unmask it once the link is back up, like in probe. Also keep the
> interrupt masked while .reset_root_port() resets the controller, so the
> link down caused by the reset itself is not reported.
> 
> Fixes: b376b3ff9cb0 ("PCI: dw-rockchip: Implement .reset_root_port() and use for link down")
> Reported-by: James Le Cuirot <chewi@gentoo.org>
> Closes: https://lore.kernel.org/linux-pci/08cc96c5171fc969b074371692e6d95d46eba60b.camel@gentoo.org/
> Cc: stable@vger.kernel.org
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

(snip)

> base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f


Ping on this patch, since it is a recent regression, it is targeting the
current release 7.4 and is based on v7.4-rc4.

Looking at the changes in pci/for-next, I think there might be conflicts
if you try to queue it for the next release instead of the current release.


Kind regards,
Niklas

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2026-12-03 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 12:12 [PATCH] PCI: dw-rockchip: Clear stale link down interrupt before unmasking it Niklas Cassel
2026-11-23 12:12 ` Niklas Cassel
2026-11-23 12:29 ` sashiko-bot
2026-11-23 15:42 ` Shawn Lin
2026-11-23 15:42   ` Shawn Lin
2026-11-23 20:55 ` Wilfred Mallawa
2026-11-23 20:55   ` Wilfred Mallawa
2026-11-24 23:25 ` James Le Cuirot
2026-11-24 23:25   ` James Le Cuirot
2026-12-03 13:06 ` Niklas Cassel [this message]
2026-12-03 13:06   ` Niklas Cassel

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=axFpTwBnyAb4Otuc@ryzen \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=chewi@gentoo.org \
    --cc=heiko@sntech.de \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=stable@vger.kernel.org \
    --cc=wilfred.mallawa@wdc.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 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.