linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix Vector table and PBA addresses print output
@ 2018-01-30 10:34 Gustavo Pimentel
  2018-01-30 14:07 ` Alex Williamson
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Pimentel @ 2018-01-30 10:34 UTC (permalink / raw)
  To: linux-pci; +Cc: mj, Gustavo Pimentel

Lack of 3-bit rotation to the right was leading to erroneous display of the
vector table and PBA.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
 ls-caps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ls-caps.c b/ls-caps.c
index 507771a..cd13a37 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1104,10 +1104,10 @@ cap_msix(struct device *d, int where, int cap)
 
   off = get_conf_long(d, where + PCI_MSIX_TABLE);
   printf("\t\tVector table: BAR=%d offset=%08x\n",
-	 off & PCI_MSIX_BIR, off & ~PCI_MSIX_BIR);
+	 off & PCI_MSIX_BIR, (off & ~PCI_MSIX_BIR) >> 3);
   off = get_conf_long(d, where + PCI_MSIX_PBA);
   printf("\t\tPBA: BAR=%d offset=%08x\n",
-	 off & PCI_MSIX_BIR, off & ~PCI_MSIX_BIR);
+	 off & PCI_MSIX_BIR, (off & ~PCI_MSIX_BIR) >> 3);
 }
 
 static void
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-31 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-30 10:34 [PATCH] Fix Vector table and PBA addresses print output Gustavo Pimentel
2018-01-30 14:07 ` Alex Williamson
2018-01-30 16:08   ` Gustavo Pimentel
2018-01-30 16:45     ` Alex Williamson
2018-01-31 12:41       ` Martin Mares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).