Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/pci Match any device with class bridge and sub...



details:   https://anonhg.NetBSD.org/src/rev/fc9d2d32c9bf
branches:  trunk
changeset: 508891:fc9d2d32c9bf
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Apr 21 19:18:20 2001 +0000

description:
Match any device with class bridge and subclass BRIDGE_MC, instead
of matching individual products. Pointed out by Jason Thorpe.

diffstat:

 sys/arch/i386/pci/pcmb.c |  16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diffs (31 lines):

diff -r 771e43a79bdd -r fc9d2d32c9bf sys/arch/i386/pci/pcmb.c
--- a/sys/arch/i386/pci/pcmb.c  Sat Apr 21 18:51:17 2001 +0000
+++ b/sys/arch/i386/pci/pcmb.c  Sat Apr 21 19:18:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcmb.c,v 1.1 2001/03/25 09:54:10 jdolecek Exp $        */
+/*     $NetBSD: pcmb.c,v 1.2 2001/04/21 19:18:20 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -80,17 +80,11 @@
        struct pci_attach_args *pa = aux;
 
        /*
-        * Match all known PCI-MCA bridges.
+        * Match anything which claims to be PCI-MCA bridge.
         */
-       switch (PCI_VENDOR(pa->pa_id)) {
-       case PCI_VENDOR_IBM:
-               switch (PCI_PRODUCT(pa->pa_id)) {
-               case PCI_PRODUCT_IBM_MCABRIDGE:
-               case PCI_PRODUCT_IBM_MCABRIDGE2:
-                       return (1);
-               }
-               break;
-       }
+       if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE
+           && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_MC)
+               return (1);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index