Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Put back __PCI_BUS_DEVORDER for now.



details:   https://anonhg.NetBSD.org/src/rev/975c35271422
branches:  trunk
changeset: 527012:975c35271422
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 15 18:39:47 2002 +0000

description:
Put back __PCI_BUS_DEVORDER for now.

diffstat:

 sys/dev/pci/pci.c |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r fdc7ac390355 -r 975c35271422 sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c Wed May 15 18:37:54 2002 +0000
+++ b/sys/dev/pci/pci.c Wed May 15 18:39:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.c,v 1.59 2002/05/15 18:13:00 thorpej Exp $ */
+/*     $NetBSD: pci.c,v 1.60 2002/05/15 18:39:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.59 2002/05/15 18:13:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.60 2002/05/15 18:39:47 thorpej Exp $");
 
 #include "opt_pci.h"
 
@@ -407,8 +407,18 @@
        const struct pci_quirkdata *qd;
        pcireg_t id, bhlcr;
        pcitag_t tag;
+#ifdef __PCI_BUS_DEVORDER
+       char devs[32];
+       int i;
+#endif
 
-       for (device = 0; device < sc->sc_maxndevs; device++) {
+#ifdef __PCI_BUS_DEVORDER
+       pci_bus_devorder(sc->sc_pc, sc->sc_bus, devs);
+       for (i = 0; (device = devs[i]) < 32 && device >= 0; i++)
+#else
+       for (device = 0; device < sc->sc_maxndevs; device++)
+#endif
+       {
                tag = pci_make_tag(pc, sc->sc_bus, device, 0);
                id = pci_conf_read(pc, tag, PCI_ID_REG);
 



Home | Main Index | Thread Index | Old Index