From: Aviv Bakal <avivb@amazon.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
"Lukas Wunner" <lukas@wunner.de>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Zeev Zilberman <zeev@amazon.com>, <stable@vger.kernel.org>
Subject: [PATCH v2 2/3] PCI: Avoid runtime D3 on Amazon PCIe switch ports
Date: Mon, 16 Nov 2026 18:51:09 +0200 [thread overview]
Message-ID: <20261116165110.2773301-3-avivb@amazon.com> (raw)
In-Reply-To: <20261116165110.2773301-1-avivb@amazon.com>
The PCIe switch ports on AWS instances (vendor 0x1d0f) advertise PME
from D3hot but do not send it. Since commit d4c79b63d82d ("PCI: Allow
D3 for native hotplug-capable Root Ports on non-x86 platforms") these
ports runtime suspend to D3hot on non-x86 platforms, and hotplug events
such as an ENI attach are lost.
Mark them PCI_DEV_FLAGS_NO_D3, reusing quirk_no_ata_d3() renamed to
quirk_no_d3().
Fixes: d4c79b63d82d ("PCI: Allow D3 for native hotplug-capable Root Ports on non-x86 platforms")
Cc: stable@vger.kernel.org # 7.3.x
Co-developed-by: Zeev Zilberman <zeev@amazon.com>
Signed-off-by: Zeev Zilberman <zeev@amazon.com>
Signed-off-by: Aviv Bakal <avivb@amazon.com>
---
drivers/pci/quirks.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7f1f47ea2ee4..338e884126fb 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1458,23 +1458,31 @@ static void quirk_ide_samemode(struct pci_dev *pdev)
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, quirk_ide_samemode);
-/* Some ATA devices break if put into D3 */
-static void quirk_no_ata_d3(struct pci_dev *pdev)
+/* Some devices break if put into D3 */
+static void quirk_no_d3(struct pci_dev *pdev)
{
pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
}
/* Quirk the legacy ATA devices only. The AHCI ones are ok */
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_ANY_ID,
- PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_d3);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
- PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_d3);
/* ALi loses some register settings that we cannot then restore */
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID,
- PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_d3);
/* VIA comes back fine but we need to keep it alive or ACPI GTM failures
occur when mode detecting */
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
- PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+ PCI_CLASS_STORAGE_IDE, 8, quirk_no_d3);
+
+/*
+ * Amazon 1d0f PCIe switch ports (e.g. 1d0f:cec2) on AWS instances
+ * advertise PME# from D3hot but never assert it, so hotplug events on
+ * a port in D3 are lost.
+ */
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AMAZON, PCI_ANY_ID,
+ PCI_CLASS_BRIDGE_PCI, 8, quirk_no_d3);
/*
* This was originally an Alpha-specific thing, but it really fits here.
--
2.50.1
next prev parent reply other threads:[~2026-11-16 16:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:51 [PATCH v2 0/3] PCI/PM: Keep hotplug ports that can't wake from D3hot out of D3 Aviv Bakal
2026-11-16 16:51 ` [PATCH v2 1/3] PCI/PM: Honor PCI_DEV_FLAGS_NO_D3 in pci_bridge_d3_possible() Aviv Bakal
2026-11-16 17:11 ` sashiko-bot
2026-11-16 17:47 ` Kuppuswamy Sathyanarayanan
2026-11-16 16:51 ` Aviv Bakal [this message]
2026-11-16 16:58 ` [PATCH v2 2/3] PCI: Avoid runtime D3 on Amazon PCIe switch ports sashiko-bot
2026-11-16 16:51 ` [PATCH v2 3/3] PCI/PM: Keep hotplug ports out of D3 if they can't signal PME from D3hot Aviv Bakal
2026-11-16 17:04 ` sashiko-bot
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=20261116165110.2773301-3-avivb@amazon.com \
--to=avivb@amazon.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=zeev@amazon.com \
/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.