summaryrefslogtreecommitdiff
path: root/sys/dev/pci/agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/agp.c')
-rw-r--r--sys/dev/pci/agp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c
index 49bcbef2704..05526203d67 100644
--- a/sys/dev/pci/agp.c
+++ b/sys/dev/pci/agp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp.c,v 1.16 2008/01/04 00:23:26 kettenis Exp $ */
+/* $OpenBSD: agp.c,v 1.17 2008/03/16 19:00:28 oga Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
* All rights reserved.
@@ -110,6 +110,11 @@ agp_probe(struct device *parent, void *match, void *aux)
struct agpbus_attach_args *aaa = aux;
struct pci_attach_args *pa = &aaa->apa_pci_args;
+ /* pci_args must be a pchb */
+ if (PCI_CLASS(pa->pa_class) != PCI_CLASS_BRIDGE ||
+ PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_BRIDGE_HOST)
+ return (0);
+
if (agp_lookup(pa) == NULL)
return (0);