Index: dev/pci/vga_pci.c =================================================================== RCS file: /usr/cvs/src/sys/dev/pci/vga_pci.c,v retrieving revision 1.4 diff -u -r1.4 vga_pci.c --- dev/pci/vga_pci.c 22 Dec 2005 16:25:22 -0000 1.4 +++ dev/pci/vga_pci.c 31 Jan 2006 22:28:35 -0000 @@ -70,13 +70,6 @@ bus_generic_probe(dev); - /* - * If AGP capabilities are present on this device, then create - * an AGP child. - */ - if (pci_find_extcap(dev, PCIY_AGP, NULL) == 0) - device_add_child(dev, "agp", -1); - /* Always create a drm child for now to make it easier on drm. */ device_add_child(dev, "drm", -1); bus_generic_attach(dev); Index: pci/agp_i810.c =================================================================== RCS file: /usr/cvs/src/sys/pci/agp_i810.c,v retrieving revision 1.34 diff -u -r1.34 agp_i810.c --- pci/agp_i810.c 20 Dec 2005 22:44:35 -0000 1.34 +++ pci/agp_i810.c 31 Jan 2006 22:37:03 -0000 @@ -195,6 +195,15 @@ } static int +agp_i810_identify(driver_t *driver, device_t parent) +{ + + if (device_find_child(parent, "agp", -1) == NULL && + agp_i810_match(parent)) + device_add_child(parent, "agp", -1); +} + +static int agp_i810_probe(device_t dev) { const char *desc; @@ -799,6 +808,7 @@ static device_method_t agp_i810_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, agp_i810_identify), DEVMETHOD(device_probe, agp_i810_probe), DEVMETHOD(device_attach, agp_i810_attach), DEVMETHOD(device_detach, agp_i810_detach),