diff mbox

Make MSI-X table size match the spec

Message ID 20090503071309.GA9685@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Michael S. Tsirkin May 3, 2009, 7:13 a.m. UTC
MSI-X table size is 11 bits, not 10. See also PCI_MSIX_FLAGS_QSIZE
in linux/pci_regs.h. Make PCI_MSIX_TABSIZE match that.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

It seems that PCI_MSIX_TABSIZE is out of sync with PCI spec
(and with linux/pci_regs.h). Here's an attempt to fix that -
makes sense?

 lib/header.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Martin Mareš May 3, 2009, 8:33 a.m. UTC | #1
Hi!

> MSI-X table size is 11 bits, not 10. See also PCI_MSIX_FLAGS_QSIZE
> in linux/pci_regs.h. Make PCI_MSIX_TABSIZE match that.

This looks correct. I'm Cc'ing Roland Dreier, who wrote the original MSI-X
dump code back in 2004.

Unless Roland objects, I am going to push out a release soon.

> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> 
> It seems that PCI_MSIX_TABSIZE is out of sync with PCI spec
> (and with linux/pci_regs.h). Here's an attempt to fix that -
> makes sense?
> 
>  lib/header.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/header.h b/lib/header.h
> index ad8bce6..ec34f44 100644
> --- a/lib/header.h
> +++ b/lib/header.h
> @@ -862,7 +862,7 @@
>  /* MSI-X */
>  #define  PCI_MSIX_ENABLE	0x8000
>  #define  PCI_MSIX_MASK		0x4000
> -#define  PCI_MSIX_TABSIZE	0x03ff
> +#define  PCI_MSIX_TABSIZE	0x07ff
>  #define PCI_MSIX_TABLE		4
>  #define PCI_MSIX_PBA		8
>  #define  PCI_MSIX_BIR		0x7
> -- 
> 1.6.3.rc3.dirty

				Have a nice fortnight
Roland Dreier May 6, 2009, 8:19 p.m. UTC | #2
> > MSI-X table size is 11 bits, not 10. See also PCI_MSIX_FLAGS_QSIZE
 > > in linux/pci_regs.h. Make PCI_MSIX_TABSIZE match that.
 > 
 > This looks correct. I'm Cc'ing Roland Dreier, who wrote the original MSI-X
 > dump code back in 2004.
 > 
 > Unless Roland objects, I am going to push out a release soon.

Sorry for the slow reply.  Looks fine to me, likely just a stupid typo
or a misreading of the spec I made when I wrote the original code; I'm
sure I didn't have any devices with 11 bit MSI-X table sizes to test
with.  So mst's patch looks good to me.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/header.h b/lib/header.h
index ad8bce6..ec34f44 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -862,7 +862,7 @@ 
 /* MSI-X */
 #define  PCI_MSIX_ENABLE	0x8000
 #define  PCI_MSIX_MASK		0x4000
-#define  PCI_MSIX_TABSIZE	0x03ff
+#define  PCI_MSIX_TABSIZE	0x07ff
 #define PCI_MSIX_TABLE		4
 #define PCI_MSIX_PBA		8
 #define  PCI_MSIX_BIR		0x7