From: Manivannan Sadhasivam via B4 Relay <devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>
To: "Jeff Johnson" <jjohnson@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Nirmal Patel" <nirmal.patel@linux.intel.com>,
"Jonathan Derrick" <jonathan.derrick@linux.dev>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
ath12k@lists.infradead.org, ath11k@lists.infradead.org,
ath10k@lists.infradead.org, Bjorn Helgaas <helgaas@kernel.org>,
ilpo.jarvinen@linux.intel.com, linux-arm-msm@vger.kernel.org,
linux-pci@vger.kernel.org,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Subject: [PATCH 3/6] PCI/ASPM: Improve the kernel-doc for pci_disable_link_state*() APIs
Date: Wed, 16 Jul 2025 18:26:22 +0530 [thread overview]
Message-ID: <20250716-ath-aspm-fix-v1-3-dd3e62c1b692@oss.qualcomm.com> (raw)
In-Reply-To: <20250716-ath-aspm-fix-v1-0-dd3e62c1b692@oss.qualcomm.com>
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Add kernel-doc for pci_disable_link_state_locked() API and fix the
kernel-doc for pci_disable_link_state() API.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
drivers/pci/pcie/aspm.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index c56553de953c158cf9e8bf54c6b358a9a81a2691..4d30e894198c40a168fc03626270b361d5124b67 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -1409,6 +1409,19 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool locked
return 0;
}
+/**
+ * pci_disable_link_state_locked - Disable device's link state
+ * @pdev: PCI device
+ * @state: ASPM link state to disable
+ *
+ * Disable device's link state, so the link will never enter specific states.
+ * Note that if the BIOS didn't grant ASPM control to the OS, this does nothing
+ * because we can't touch the LNKCTL register.
+ *
+ * Context: Caller holds pci_bus_sem read lock.
+ *
+ * Return: 0 on success, a negative errno otherwise.
+ */
int pci_disable_link_state_locked(struct pci_dev *pdev, int state)
{
lockdep_assert_held_read(&pci_bus_sem);
@@ -1418,13 +1431,15 @@ int pci_disable_link_state_locked(struct pci_dev *pdev, int state)
EXPORT_SYMBOL(pci_disable_link_state_locked);
/**
- * pci_disable_link_state - Disable device's link state, so the link will
- * never enter specific states. Note that if the BIOS didn't grant ASPM
- * control to the OS, this does nothing because we can't touch the LNKCTL
- * register. Returns 0 or a negative errno.
- *
+ * pci_disable_link_state - Disable device's link state
* @pdev: PCI device
* @state: ASPM link state to disable
+ *
+ * Disable device's link state, so the link will never enter specific states.
+ * Note that if the BIOS didn't grant ASPM control to the OS, this does nothing
+ * because we can't touch the LNKCTL register.
+ *
+ * Return: 0 on success, a negative errno otherwise.
*/
int pci_disable_link_state(struct pci_dev *pdev, int state)
{
--
2.45.2
next prev parent reply other threads:[~2025-07-16 12:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 12:56 [PATCH 0/6] PCI/ASPM: Fix pci_enable_link_state*() APIs behavior Manivannan Sadhasivam via B4 Relay
2025-07-16 12:56 ` [PATCH 1/6] PCI/ASPM: Fix the behavior of pci_enable_link_state*() APIs Manivannan Sadhasivam via B4 Relay
2025-07-16 12:56 ` [PATCH 2/6] PCI/ASPM: Transition the device to D0 (if required) inside pci_enable_link_state_locked() API Manivannan Sadhasivam via B4 Relay
2025-07-16 20:56 ` Bjorn Helgaas
2025-07-17 7:36 ` Manivannan Sadhasivam
2025-07-16 12:56 ` Manivannan Sadhasivam via B4 Relay [this message]
2025-07-16 12:56 ` [PATCH 4/6] wifi: ath12k: Use pci_{enable/disable}_link_state() APIs to enable/disable ASPM states Manivannan Sadhasivam via B4 Relay
2025-07-17 6:59 ` kernel test robot
2025-07-18 8:22 ` Manivannan Sadhasivam
2025-07-17 9:24 ` Baochen Qiang
2025-07-17 10:31 ` Manivannan Sadhasivam
2025-07-17 10:46 ` Baochen Qiang
2025-07-17 10:55 ` Konrad Dybcio
2025-07-17 10:59 ` Baochen Qiang
2025-07-17 11:29 ` Manivannan Sadhasivam
2025-07-18 2:05 ` Baochen Qiang
2025-07-18 7:57 ` Manivannan Sadhasivam
2025-07-18 8:03 ` Krishna Chaitanya Chundru
2025-07-18 8:12 ` Manivannan Sadhasivam
2025-07-18 8:17 ` Krishna Chaitanya Chundru
2025-07-18 10:20 ` Manivannan Sadhasivam
2025-07-18 11:05 ` Baochen Qiang
2025-07-18 11:49 ` Manivannan Sadhasivam
2025-07-18 16:26 ` Bjorn Helgaas
2025-07-18 17:19 ` Manivannan Sadhasivam
2025-07-21 8:04 ` Ilpo Järvinen
2025-07-21 8:29 ` Manivannan Sadhasivam
2025-07-21 10:09 ` Ilpo Järvinen
2025-07-21 11:08 ` Manivannan Sadhasivam
2025-07-21 11:28 ` Ilpo Järvinen
2025-08-07 10:03 ` Manivannan Sadhasivam
2025-07-16 12:56 ` [PATCH 5/6] wifi: ath11k: " Manivannan Sadhasivam via B4 Relay
2025-07-16 12:56 ` [PATCH 6/6] wifi: ath10k: " Manivannan Sadhasivam via B4 Relay
2025-07-16 17:11 ` [PATCH 0/6] PCI/ASPM: Fix pci_enable_link_state*() APIs behavior Jeff Johnson
2025-07-18 7:58 ` Manivannan Sadhasivam
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=20250716-ath-aspm-fix-v1-3-dd3e62c1b692@oss.qualcomm.com \
--to=devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org \
--cc=ath10k@lists.infradead.org \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jjohnson@kernel.org \
--cc=jonathan.derrick@linux.dev \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=nirmal.patel@linux.intel.com \
--cc=robh@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).