Module Name: src Committed By: msaitoh Date: Tue May 27 16:10:33 UTC 2014
Modified Files: src/sys/dev/pci: pcireg.h Log Message: - Fix incorrect calculation in PCI_MSIX_CTL_TBLSIZE(). - The PCI_MSIX_CTL_TBLSIZE bit field is in N-1, so add +1. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.91 src/sys/dev/pci/pcireg.h:1.92 --- src/sys/dev/pci/pcireg.h:1.91 Sat May 24 18:06:21 2014 +++ src/sys/dev/pci/pcireg.h Tue May 27 16:10:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.91 2014/05/24 18:06:21 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.92 2014/05/27 16:10:33 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -944,7 +944,8 @@ typedef u_int8_t pci_revision_t; #define PCI_MSIX_CTL_FUNCMASK 0x40000000 #define PCI_MSIX_CTL_TBLSIZE_MASK 0x07ff0000 #define PCI_MSIX_CTL_TBLSIZE_SHIFT 16 -#define PCI_MSIX_CTL_TBLSIZE(ofs) (((ofs) >> PCI_MSIX_CTL_TBLSIZE_SHIFT) & PCI_MSIX_CTL_TBLSIZE_MASK) +#define PCI_MSIX_CTL_TBLSIZE(ofs) ((((ofs) & PCI_MSIX_CTL_TBLSIZE_MASK) \ + >> PCI_MSIX_CTL_TBLSIZE_SHIFT) + 1) /* * 2nd DWORD is the Table Offset */