pciutils/0003-lspci-Decode-10-Bit-Tag-Requester-Enable.patch
2022-09-20 10:28:52 +08:00

53 lines
2.1 KiB
Diff

From 3afdb452bc82421a18e57913f57d8d4caf50dbcc Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Sat, 29 Aug 2020 18:58:42 +0800
Subject: [PATCH openEuler-22.03-LTS 4/4] lspci: Decode 10-Bit Tag Requester
Enable
Decode 10-Bit Tag Requester Enable bit in Device Control 2 Register.
Sample output changes:
- DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
+ DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Wangming Shao <shaowangming@h-partners.com>
---
lib/header.h | 1 +
ls-caps.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/header.h b/lib/header.h
index 5fdea88..f53ab43 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -900,6 +900,7 @@
#define PCI_EXP_DEVCTL2_ATOMICOP_REQUESTER_EN 0x0040 /* AtomicOp RequesterEnable */
#define PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK 0x0080 /* AtomicOp Egress Blocking */
#define PCI_EXP_DEVCTL2_LTR 0x0400 /* LTR enabled */
+#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 */
#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities */
diff --git a/ls-caps.c b/ls-caps.c
index a068fd3..b616a4b 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1134,10 +1134,11 @@ static void cap_express_dev2(struct device *d, int where, int type)
}
w = get_conf_word(d, where + PCI_EXP_DEVCTL2);
- printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c OBFF %s,",
+ printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,",
cap_express_dev2_timeout_value(PCI_EXP_DEVCTL2_TIMEOUT_VALUE(w)),
FLAG(w, PCI_EXP_DEVCTL2_TIMEOUT_DIS),
FLAG(w, PCI_EXP_DEVCTL2_LTR),
+ FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ),
cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w)));
if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM)
printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEVCTL2_ARI));
--
2.33.0