Subject: kern/9589: PCI-EISA bridge doesn't attach
To: None <gnats-bugs@gnats.netbsd.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: netbsd-bugs
Date: 03/09/2000 04:02:19
>Number:         9589
>Category:       kern
>Synopsis:       PCI-EISA bridge doesn't attach
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar  9 04:00:01 2000
>Last-Modified:
>Originator:     Johan Danielsson
>Organization:
	<organization of PR author (multiple lines)>
>Release:        <NetBSD-current source date>
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: NetBSD blubb.pdc.kth.se 1.4T NetBSD 1.4T (BLUBB) #195: Thu Feb 17 19:42:40 CET 2000 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/netbsd-cvs/src/sys/arch/i386/compile/BLUBB i386


>Description:

Currently arch/i386/pci/pceb.c only attaches Intel PCI-EISA
bridges. Is there any reason why it doesn't attach to any EISA bridge?

>How-To-Repeat:
Boot a machine with a non-intel EISA bridge.
>Fix:
Index: pceb.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/pci/pceb.c,v
retrieving revision 1.5
diff -w -u -u -w -r1.5 pceb.c
--- pceb.c	1998/08/05 02:11:00	1.5
+++ pceb.c	2000/03/09 11:54:32
@@ -79,16 +79,12 @@
 	struct pci_attach_args *pa = aux;
 
 	/*
-	 * Match all known PCI-EISA bridges.
+	 * Match all PCI-EISA bridges.
 	 */
-	switch (PCI_VENDOR(pa->pa_id)) {
-	case PCI_VENDOR_INTEL:
-		switch (PCI_PRODUCT(pa->pa_id)) {
-		case PCI_PRODUCT_INTEL_PCEB:
+
+	if(PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE &&
+	   PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_EISA)
 			return (1);
-		}
-		break;
-	}
 
 	return (0);
 }
>Audit-Trail:
>Unformatted: