Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix i810/other intel chipsets attach mishap.
details: https://anonhg.NetBSD.org/src/rev/b4c28e0550ad
branches: trunk
changeset: 514843:b4c28e0550ad
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Sep 11 06:51:47 2001 +0000
description:
Fix i810/other intel chipsets attach mishap.
diffstat:
sys/dev/pci/agp.c | 13 ++++++++-----
sys/dev/pci/agp_i810.c | 4 ++--
sys/dev/pci/agpvar.h | 3 ++-
3 files changed, 12 insertions(+), 8 deletions(-)
diffs (69 lines):
diff -r 20485380a722 -r b4c28e0550ad sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Tue Sep 11 06:41:14 2001 +0000
+++ b/sys/dev/pci/agp.c Tue Sep 11 06:51:47 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.1 2001/09/10 10:01:01 fvdl Exp $ */
+/* $NetBSD: agp.c,v 1.2 2001/09/11 06:51:47 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -118,9 +118,9 @@
case PCI_VENDOR_AMD:
return agp_amd_match(parent, match, pa);
case PCI_VENDOR_INTEL:
- if (agp_intel_match(parent, match, pa) != 0)
- return 1;
- return agp_i810_match(parent, match, pa);
+ if (agp_i810_bridgematch(pa))
+ return agp_i810_match(parent, match, pa);
+ return agp_intel_match(parent, match, pa);
case PCI_VENDOR_SIS:
return agp_sis_match(parent, match, pa);
case PCI_VENDOR_VIATECH:
@@ -188,7 +188,10 @@
ret = agp_amd_attach(parent, self, pa);
break;
case PCI_VENDOR_INTEL:
- ret = agp_intel_attach(parent, self, pa);
+ if (agp_i810_bridgematch(pa))
+ ret = agp_i810_attach(parent, self, pa);
+ else
+ ret = agp_intel_attach(parent, self, pa);
break;
case PCI_VENDOR_SIS:
ret = agp_sis_attach(parent, self, pa);
diff -r 20485380a722 -r b4c28e0550ad sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c Tue Sep 11 06:41:14 2001 +0000
+++ b/sys/dev/pci/agp_i810.c Tue Sep 11 06:51:47 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp_i810.c,v 1.2 2001/09/10 12:51:42 fvdl Exp $ */
+/* $NetBSD: agp_i810.c,v 1.3 2001/09/11 06:51:47 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -107,7 +107,7 @@
/*
* Find bridge device.
*/
-static int
+int
agp_i810_bridgematch(struct pci_attach_args *pa)
{
switch (PCI_PRODUCT(pa->pa_id)) {
diff -r 20485380a722 -r b4c28e0550ad sys/dev/pci/agpvar.h
--- a/sys/dev/pci/agpvar.h Tue Sep 11 06:41:14 2001 +0000
+++ b/sys/dev/pci/agpvar.h Tue Sep 11 06:51:47 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agpvar.h,v 1.1 2001/09/10 10:01:02 fvdl Exp $ */
+/* $NetBSD: agpvar.h,v 1.2 2001/09/11 06:51:47 fvdl Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -185,6 +185,7 @@
int agp_ali_match(struct device *, struct cfdata *, void *);
int agp_amd_match(struct device *, struct cfdata *, void *);
int agp_i810_match(struct device *, struct cfdata *, void *);
+int agp_i810_bridgematch(struct pci_attach_args *);
int agp_intel_match(struct device *, struct cfdata *, void *);
int agp_sis_match(struct device *, struct cfdata *, void *);
int agp_via_match(struct device *, struct cfdata *, void *);
Home |
Main Index |
Thread Index |
Old Index