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 the self-describing bogus code block, at leas...



details:   https://anonhg.NetBSD.org/src/rev/f233d7523f6e
branches:  trunk
changeset: 504428:f233d7523f6e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 02 06:56:11 2001 +0000

description:
In the self-describing bogus code block, at least use plausible
subclass IDs.

diffstat:

 sys/dev/pci/puc.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r 914ec83e140c -r f233d7523f6e sys/dev/pci/puc.c
--- a/sys/dev/pci/puc.c Fri Mar 02 06:53:54 2001 +0000
+++ b/sys/dev/pci/puc.c Fri Mar 02 06:56:11 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: puc.c,v 1.10 2001/01/03 15:13:15 bouyer Exp $  */
+/*     $NetBSD: puc.c,v 1.11 2001/03/02 06:56:11 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996, 1998, 1999
@@ -136,9 +136,13 @@
         * Match class/subclass, so we can tell people to compile kernel
         * with options that cause this driver to spew.
         */
-       if (PCI_CLASS(pa->pa_class) == PCI_CLASS_COMMUNICATIONS &&
-           PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_PCI)
-               return (1);
+       if (PCI_CLASS(pa->pa_class) == PCI_CLASS_COMMUNICATIONS) {
+               switch (PCI_SUBCLASS(pa->pa_class)) {
+               case PCI_SUBCLASS_COMMUNICATIONS_SERIAL:
+               case PCI_SUBCLASS_COMMUNICATIONS_MODEM:
+                       return (1);
+               }
+       }
 #endif
 
        return (0);



Home | Main Index | Thread Index | Old Index