From: sashiko-bot@kernel.org
To: "Niklas Cassel" <cassel@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: dw-rockchip: Clear stale link down interrupt before unmasking it
Date: Mon, 23 Nov 2026 12:29:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-229219@kernel.org> (raw)
In-Reply-To: <20261123121217.1107902-2-cassel@kernel.org>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] PCI: dw-rockchip: resource underflow in
rockchip_pcie_rc_reset_root_port() [1]
--
commit 923d90cd91ba94b914ca3ad6a3e4e9904ee542db
Author: Niklas Cassel <cassel@kernel.org>
PCI: dw-rockchip: Clear stale link down interrupt before unmasking it
This commit clears the pending PCIE_LINK_REQ_RST_NOT_INT status bit before
unmasking the link-down interrupt, and keeps it masked during Root Port
resets until link training completes.
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index ab2e266994095..2ef7ae97eb10b 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
[ ... ]
> @@ -898,6 +908,9 @@ static int rockchip_pcie_rc_reset_root_port(struct pci_host_bridge *bridge,
> u32 val;
> int ret;
>
> + val = FIELD_PREP_WM16(PCIE_LINK_REQ_RST_NOT_INT, 1);
> + rockchip_pcie_writel_apb(rockchip, val, PCIE_CLIENT_INTR_MASK_MISC);
> +
> dw_pcie_stop_link(pci);
> clk_bulk_disable_unprepare(rockchip->clk_cnt, rockchip->clks);
> rockchip_pcie_phy_deinit(rockchip);
[Severity: High]
This problem wasn't introduced by this patch, but can a failure in
rockchip_pcie_rc_reset_root_port() leave rockchip->clks and rockchip->phy
disabled and underflow their enable counts [1] on a later reset?
After clk_bulk_disable_unprepare() and rockchip_pcie_phy_deinit() run, an
error from reset_control_assert() (or any of the later failure paths that
unwind back to deinit_clk / deinit_phy) returns with the clocks and PHY
disabled, so the next rockchip_pcie_rc_reset_root_port() call disables
them a second time.
[1] https://sashiko.dev/#/bug/linux-8ab80679-6144-4519-a14c-191434f49050
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123121217.1107902-2-cassel@kernel.org?part=1
next prev parent reply other threads:[~2026-11-23 12:29 UTC|newest]
Thread overview: 9+ 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 [this message]
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
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=sashiko-outbox-229219@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cassel@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.