From: "Saheed O. Bolarinwa" <refactormyself@gmail.com>
To: helgaas@kernel.org
Cc: "Saheed O. Bolarinwa" <refactormyself@gmail.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH v1 1/2] PCI/ASPM: Never enable ASPM for insane devices
Date: Sat, 6 Nov 2021 18:56:20 +0100 [thread overview]
Message-ID: <20211106175621.28250-2-refactormyself@gmail.com> (raw)
In-Reply-To: <20211106175621.28250-1-refactormyself@gmail.com>
aspm_attr_store_common() makes it possible to clear the disable bits
even for devices that fails pcie_aspm_sanity_check().
- Extend the if condition in aspm_attr_store_common() to screen out
insane devices.
Signed-off-by: Saheed O. Bolarinwa <refactormyself@gmail.com>
---
drivers/pci/pcie/aspm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 013a47f587ce..72cb17489e88 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -1225,7 +1225,7 @@ static ssize_t aspm_attr_store_common(struct device *dev,
down_read(&pci_bus_sem);
mutex_lock(&aspm_lock);
- if (state_enable) {
+ if (state_enable && !pcie_aspm_sanity_check(pdev)) {
link->aspm_disable &= ~state;
/* need to enable L1 for substates */
if (state & ASPM_STATE_L1SS)
--
2.20.1
next prev parent reply other threads:[~2021-11-06 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 17:56 [RFC PATCH v1 0/2] Keep insane devices disabled Saheed O. Bolarinwa
2021-11-06 17:56 ` Saheed O. Bolarinwa [this message]
2021-11-06 17:56 ` [RFC PATCH v1 2/2] PCI/ASPM: Never enable CLKPM for insane devices Saheed O. Bolarinwa
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=20211106175621.28250-2-refactormyself@gmail.com \
--to=refactormyself@gmail.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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).