Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/x86/pci/pci_machdep.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/x86/pci/pci_machdep.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.26 retrieving revision 1.26.6.3 diff -u -p -r1.26 -r1.26.6.3 --- src/sys/arch/x86/pci/pci_machdep.c 2007/07/22 23:45:50 1.26 +++ src/sys/arch/x86/pci/pci_machdep.c 2008/03/23 02:04:28 1.26.6.3 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.26 2007/07/22 23:45:50 mjf Exp $ */ +/* pci_machdep.c,v 1.26.6.2 2008/01/09 01:49:51 matt Exp */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.26 2007/07/22 23:45:50 mjf Exp $"); +__KERNEL_RCSID(0, "pci_machdep.c,v 1.26.6.2 2008/01/09 01:49:51 matt Exp"); #include #include @@ -88,14 +88,14 @@ __KERNEL_RCSID(0, "$NetBSD: pci_machdep. #include #include #include -#include +#include #include -#include #include #include +#include #include #include @@ -242,8 +242,7 @@ struct x86_bus_dma_tag pci_bus_dma64_tag #endif void -pci_attach_hook(struct device *parent, struct device *self, - struct pcibus_attach_args *pba) +pci_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba) { if (pba->pba_bus == 0) @@ -376,6 +375,7 @@ pci_conf_read( pci_chipset_tag_t pc, pci pcireg_t data; int s; + KASSERT((reg & 0x3) == 0); #if defined(__i386__) && defined(XBOX) if (arch_i386_is_xbox) { int bus, dev, fn; @@ -428,6 +428,7 @@ pci_conf_write(pci_chipset_tag_t pc, pci { int s; + KASSERT((reg & 0x3) == 0); #if defined(__i386__) && defined(XBOX) if (arch_i386_is_xbox) { int bus, dev, fn; @@ -501,8 +502,7 @@ pci_mode_detect() /* * catch some known buggy implementations of mode 1 */ - for (i = 0; i < sizeof(pcim1_quirk_tbl) / sizeof(pcim1_quirk_tbl[0]); - i++) { + for (i = 0; i < __arraycount(pcim1_quirk_tbl); i++) { pcitag_t t; if (!pcim1_quirk_tbl[i].tag)