summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2009-09-24 07:11:23 +0000
committeravg <avg@FreeBSD.org>2009-09-24 07:11:23 +0000
commit96f7c01c8c88ab09204b311bf34772cbf18318b9 (patch)
tree74e4fa7e170e28930cb74fb5fb991eab8429fe07 /sys/dev/pci
parente9f89a2ebc629284a87e05e0400dca7ada271d6b (diff)
downloadFreeBSD-src-96f7c01c8c88ab09204b311bf34772cbf18318b9.zip
FreeBSD-src-96f7c01c8c88ab09204b311bf34772cbf18318b9.tar.gz
number of cleanups in i386 and amd64 pci md code
o introduce PCIE_REGMAX and use it instead of ad-hoc constant o where 'reg' parameter/variable is not already unsigned, cast it to unsigned before comparison with maximum value to cut off negative values o use PCI_SLOTMAX in several places where 31 or 32 were explicitly used o drop redundant check of 'bytes' in i386 pciereg_cfgread() - valid values are already checked in the subsequent switch Reviewed by: jhb MFC after: 1 week
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pcireg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index c7a7245..981d1e0 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -44,6 +44,7 @@
#define PCI_SLOTMAX 31 /* highest supported slot number */
#define PCI_FUNCMAX 7 /* highest supported function number */
#define PCI_REGMAX 255 /* highest supported config register addr. */
+#define PCIE_REGMAX 4095 /* highest supported config register addr. */
#define PCI_MAXHDRTYPE 2
/* PCI config header registers for all devices */
OpenPOWER on IntegriCloud