From 699722468a0fca8b1b9ce1ffe2532171ddcaff95 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 26 Oct 2025 17:57:57 +0100 Subject: [PATCH] PCI/PME: Replace RMW of Root Status register with direct write MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As of PCIe r7.0, the Root Status register contains a single writeable bit (PME Status, type RW1C) and otherwise just read-only bits and RsvdZ bits (which software must write as zero, PCIe r7.0 sec 7.4). Thus, when clearing the PME Status bit, there's no need to perform a read-modify-write of the register. Instead, the bit can be written directly. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen Link: https://patch.msgid.link/39f87c99f6c44be3c0371c79e454e6fde7be0d4d.1761497583.git.lukas@wunner.de --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9fc4c2226b03..10ea5e7f4b34 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2256,7 +2256,7 @@ void pcie_clear_device_status(struct pci_dev *dev) */ void pcie_clear_root_pme_status(struct pci_dev *dev) { - pcie_capability_set_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME); + pcie_capability_write_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME); } /** -- 2.47.3