From 23c277980bb711eebfd588783509c6b9d5cc8507 Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Fri, 30 Jun 2017 18:09:00 +0800 Subject: [PATCH] lspci: Fix wrong read size for RootSta We are reading wrong size(word) for this cap, since: RootSta has: PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */ PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */ Signed-off-by: Jeffy Chen Reviewed-by: Bjorn Helgaas --- ls-caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls-caps.c b/ls-caps.c index 0ca46fb..d4aebc8 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -879,7 +879,7 @@ static void cap_express_root(struct device *d, int where) printf("\t\tRootCap: CRSVisible%c\n", FLAG(w, PCI_EXP_RTCAP_CRSVIS)); - w = get_conf_word(d, where + PCI_EXP_RTSTA); + w = get_conf_long(d, where + PCI_EXP_RTSTA); printf("\t\tRootSta: PME ReqID %04x, PMEStatus%c PMEPending%c\n", w & PCI_EXP_RTSTA_PME_REQID, FLAG(w, PCI_EXP_RTSTA_PME_STATUS), -- 2.39.2