From: Roland Dreier <roland@topspin.com>
To: Martin Mares <mj@ucw.cz>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pciutils: Support for MSI-X capability
Date: Sun, 27 Jun 2004 10:07:12 -0700 [thread overview]
Message-ID: <528ye9ylof.fsf@topspin.com> (raw)
In-Reply-To: <20040627114329.GE670@ucw.cz> (Martin Mares's message of "Sun, 27 Jun 2004 13:43:29 +0200")
Martin> Applied and will appear in -test6 soon.
Martin> Could you please add a couple of comments to the
Martin> capability defines in header.h?
Thanks, sorry about leaving out the comments. Here is a patch. I
also added _CAP_ to the capability register defines so that I match
the naming convention better.
Best,
Roland
Index: pciutils-2.1.99-test6/lib/header.h
===================================================================
--- pciutils-2.1.99-test6.orig/lib/header.h 2004-06-27 04:38:42.000000000 -0700
+++ pciutils-2.1.99-test6/lib/header.h 2004-06-27 10:01:04.000000000 -0700
@@ -727,12 +727,12 @@
#define PCI_EXP_RTSTA 0x20 /* Root Status */
/* MSI-X */
-#define PCI_MSIX_ENABLE 0x8000
-#define PCI_MSIX_MASK 0x4000
-#define PCI_MSIX_TABSIZE 0x03ff
-#define PCI_MSIX_TABLE 4
-#define PCI_MSIX_PBA 8
-#define PCI_MSIX_BIR 0x7
+#define PCI_MSIX_CAP_ENABLE 0x8000 /* MSI-X enabled */
+#define PCI_MSIX_CAP_MASK 0x4000 /* All vectors masked */
+#define PCI_MSIX_CAP_TABSIZE 0x03ff /* Mask for (table_size - 1) */
+#define PCI_MSIX_TABLE 4 /* Vector table offset/BAR register */
+#define PCI_MSIX_PBA 8 /* PBA offset/BAR register */
+#define PCI_MSIX_BIR_MASK 0x7 /* Mask of BAR index for table/PBA */
/*
* The PCI interface treats multi-function devices as independent
Index: pciutils-2.1.99-test6/lspci.c
===================================================================
--- pciutils-2.1.99-test6.orig/lspci.c 2004-06-27 04:41:39.000000000 -0700
+++ pciutils-2.1.99-test6/lspci.c 2004-06-27 10:01:13.000000000 -0700
@@ -990,18 +990,18 @@
u32 off;
printf("MSI-X: Enable%c Mask%c TabSize=%d\n",
- FLAG(cap, PCI_MSIX_ENABLE),
- FLAG(cap, PCI_MSIX_MASK),
- (cap & PCI_MSIX_TABSIZE) + 1);
+ FLAG(cap, PCI_MSIX_CAP_ENABLE),
+ FLAG(cap, PCI_MSIX_CAP_MASK),
+ (cap & PCI_MSIX_CAP_TABSIZE) + 1);
if (verbose < 2 || !config_fetch(d, where + PCI_MSIX_TABLE, 8))
return;
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_MASK, off & ~PCI_MSIX_BIR_MASK);
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_MASK, off & ~PCI_MSIX_BIR_MASK);
}
static void
prev parent reply other threads:[~2004-06-27 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-26 17:58 [PATCH] pciutils: Support for MSI-X capability Roland Dreier
2004-06-26 21:54 ` Matthew Wilcox
2004-06-26 23:29 ` Roland Dreier
2004-06-27 0:54 ` Matthew Wilcox
2004-06-27 1:01 ` Roland Dreier
2004-06-27 1:08 ` Matthew Wilcox
2004-06-27 11:43 ` Martin Mares
2004-06-27 17:07 ` Roland Dreier [this message]
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=528ye9ylof.fsf@topspin.com \
--to=roland@topspin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=mj@ucw.cz \
/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.