[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231018160836.1361510-4-helgaas@kernel.org>
Date: Wed, 18 Oct 2023 11:08:31 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Martin Mares <mj@....cz>
Cc: Pali Rohár <pali@...nel.org>,
Gustavo Pimentel <Gustavo.Pimentel@...opsys.com>,
Mateusz Nowicki <mateusz.nowicki@...idigm.com>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: [PATCH 3/8] lspci: Decode PCIe DevCtl2 Emergency Power Reduction Request
From: Bjorn Helgaas <bhelgaas@...gle.com>
Decode the PCIe DevCtl2 Emergency Power Reduction Request bit.
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
lib/header.h | 1 +
ls-caps.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/header.h b/lib/header.h
index 5065465c33db..c3a720f716b7 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -906,6 +906,7 @@
#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */
#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */
#define PCI_EXP_DEVCTL2_LTR 0x0400 /* LTR enabled */
+#define PCI_EXP_DEVCTL2_EPR_REQ 0x0800 /* Emergency Power Reduction Request */
#define PCI_EXP_DEVCTL2_10BIT_TAG_REQ 0x1000 /* 10 Bit Tag Requester enabled */
#define PCI_EXP_DEVCTL2_OBFF(x) (((x) >> 13) & 3) /* OBFF enabled */
#define PCI_EXP_DEVSTA2 0x2a /* Device Status */
diff --git a/ls-caps.c b/ls-caps.c
index 0c7bef976144..19c59536f948 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1173,10 +1173,12 @@ static void cap_express_dev2(struct device *d, int where, int type)
printf(" EgressBlck%c", FLAG(w, PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK));
printf("\n");
}
- printf("\t\t\t IDOReq%c IDOCompl%c LTR%c 10BitTagReq%c OBFF %s\n",
+ printf("\t\t\t IDOReq%c IDOCompl%c LTR%c EmergencyPowerReductionReq%c\n",
FLAG(w, PCI_EXP_DEVCTL2_IDO_REQ_EN),
FLAG(w, PCI_EXP_DEVCTL2_IDO_CMP_EN),
FLAG(w, PCI_EXP_DEVCTL2_LTR),
+ FLAG(w, PCI_EXP_DEVCTL2_EPR_REQ));
+ printf("\t\t\t 10BitTagReq%c OBFF %s\n",
FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ),
cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w)));
}
--
2.34.1
Powered by blists - more mailing lists