From: sashiko-bot@kernel.org
To: "Qiang Yu" <qiang.yu@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/2] PCI: qcom: Clear Attention Button Present in Slot Capabilities
Date: Mon, 13 Jul 2026 07:51:02 +0000 [thread overview]
Message-ID: <20260713075103.35C5D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260713-b4-clear_abp_0713-v2-2-4f0333a98d4e@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incomplete fix for broken hot-plug detection on certain Qcom PCIe IP revisions.
--
--- Patch [2]: [PATCH v2 2/2] PCI: qcom: Clear Attention Button Present in Slot Capabilities ---
commit 2d72cd4fa9f71ba9a26ad4415df596d93e7bf902
Author: Qiang Yu <qiang.yu@oss.qualcomm.com>
PCI: qcom: Clear Attention Button Present in Slot Capabilities
This patch clears the Attention Button Present (ABP) bit in the Slot
Capabilities register for Qcom PCIe Root Ports, as the slots do not actually
have an attention button. This allows surprise hot-plug detection to
function properly by ensuring the Presence Detect Changed interrupt is not
disabled by pciehp.
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 465c940109a7d..0a826ba632772 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -372,6 +372,12 @@ static void qcom_pcie_set_slot_cap(struct dw_pcie *pci)
> */
> val = readl(pci->dbi_base + offset + PCI_EXP_SLTCAP);
> val |= PCI_EXP_SLTCAP_NCCS;
> +
> + /*
> + * Qcom PCIe Root Ports do not support Attention Button, so clear
> + * Attention Button Present in Slot Capabilities.
> + */
> + val &= ~PCI_EXP_SLTCAP_ABP;
[Severity: High]
This is a pre-existing issue, but does this change fully resolve the problem
for all Qcom PCIe IP revisions?
Looking at PCIE_CAP_SLOT_VAL in drivers/pci/controller/dwc/pcie-qcom.c, it
explicitly includes the PCI_EXP_SLTCAP_ABP bit:
#define PCIE_CAP_SLOT_VAL (PCI_EXP_SLTCAP_ABP | \
...)
Functions like qcom_pcie_post_init_2_3_3() and qcom_pcie_post_init_2_9_0()
do not appear to call qcom_pcie_set_slot_cap(). Instead, they directly write
PCIE_CAP_SLOT_VAL to the capability register:
qcom_pcie_post_init_2_3_3() {
...
writel(PCIE_CAP_SLOT_VAL, pci->dbi_base + offset + PCI_EXP_SLTCAP);
...
}
Since PCIE_CAP_SLOT_VAL explicitly includes PCI_EXP_SLTCAP_ABP, won't the
Attention Button Present bit remain set for platforms using revisions 2.3.3
and 2.9.0, leaving surprise hot-plug detection broken on those platforms?
> writel(val, pci->dbi_base + offset + PCI_EXP_SLTCAP);
>
> dw_pcie_dbi_ro_wr_dis(pci);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260713-b4-clear_abp_0713-v2-0-4f0333a98d4e@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-07-13 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 7:42 [PATCH v2 0/2] PCI: qcom: Clear Attention Button Present in Slot Capabilities Qiang Yu
2026-07-13 7:42 ` [PATCH v2 1/2] PCI: qcom: Rename qcom_pcie_set_slot_nccs() to qcom_pcie_set_slot_cap() Qiang Yu
2026-07-13 7:46 ` sashiko-bot
2026-07-13 7:42 ` [PATCH v2 2/2] PCI: qcom: Clear Attention Button Present in Slot Capabilities Qiang Yu
2026-07-13 7:51 ` sashiko-bot [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=20260713075103.35C5D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=qiang.yu@oss.qualcomm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox