Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci In siop_lookup_product(), actually check the PCI...



details:   https://anonhg.NetBSD.org/src/rev/90c06c37f64c
branches:  trunk
changeset: 485605:90c06c37f64c
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Tue May 02 03:59:35 2000 +0000

description:
In siop_lookup_product(), actually check the PCI *vendor* ID as well as the
product ID.
Prevents false matches of other devices, such as the DEC 21050 ppb.

diffstat:

 sys/dev/pci/siop_pci.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r ce2c5031b4c0 -r 90c06c37f64c sys/dev/pci/siop_pci.c
--- a/sys/dev/pci/siop_pci.c    Tue May 02 03:47:19 2000 +0000
+++ b/sys/dev/pci/siop_pci.c    Tue May 02 03:59:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop_pci.c,v 1.2 2000/04/27 14:06:59 bouyer Exp $      */
+/*     $NetBSD: siop_pci.c,v 1.3 2000/05/02 03:59:35 nathanw Exp $     */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -174,6 +174,10 @@
 {
        const struct siop_product_desc *pp;
        const struct siop_product_desc *rp = NULL;
+
+       if (PCI_VENDOR(id) != PCI_VENDOR_SYMBIOS)
+               return NULL;
+
        for (pp = siop_products; pp->name != NULL; pp++) {
                if (PCI_PRODUCT(id) == pp->product && pp->revision <= rev)
                        if (rp == NULL || pp->revision > rp->revision)



Home | Main Index | Thread Index | Old Index