Change the various AGP drivers that attach to the Host-PCI bridge device to
attach to the hostb driver instead. This means that agp can now be loaded at runtime (in theory at least). Also, the drivers no longer have to explicity call device_verbose() to cancel out any earlier calls to device_quiet() by the hostb(4) driver (this shows a limitation in new-bus, drivers really shouldn't be doing device_quiet() until they know they are going to drive that device, i.e. in attach).
This commit is contained in:
parent
fde66b5a2e
commit
062cc3da2d
@ -85,7 +85,6 @@ agp_ali_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_ali_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -271,6 +270,6 @@ static driver_t agp_ali_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_ali, pci, agp_ali_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_ali, hostb, agp_ali_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_ali, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_ali, pci, 1, 1, 1);
|
||||
|
@ -207,7 +207,6 @@ agp_amd_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_amd_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -415,6 +414,6 @@ static driver_t agp_amd_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_amd, pci, agp_amd_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_amd, hostb, agp_amd_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_amd, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_amd, pci, 1, 1, 1);
|
||||
|
@ -155,7 +155,6 @@ agp_amd64_probe(device_t dev)
|
||||
if (resource_disabled("agp", device_get_unit(dev)))
|
||||
return ENXIO;
|
||||
if ((desc = agp_amd64_match(dev))) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -515,6 +514,6 @@ static driver_t agp_amd64_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_amd64, pci, agp_amd64_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_amd64, hostb, agp_amd64_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_amd64, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_amd64, pci, 1, 1, 1);
|
||||
|
@ -111,7 +111,6 @@ agp_ati_probe(device_t dev)
|
||||
|
||||
desc = agp_ati_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return 0;
|
||||
}
|
||||
@ -381,6 +380,6 @@ static driver_t agp_ati_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_ati, pci, agp_ati_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_ati, hostb, agp_ati_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_ati, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_ati, pci, 1, 1, 1);
|
||||
|
@ -134,7 +134,6 @@ agp_intel_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_intel_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -425,6 +424,6 @@ static driver_t agp_intel_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_intel, pci, agp_intel_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_intel, hostb, agp_intel_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_intel, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_intel, pci, 1, 1, 1);
|
||||
|
@ -121,7 +121,6 @@ agp_nvidia_probe (device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_nvidia_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
@ -460,6 +459,6 @@ static driver_t agp_nvidia_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_nvidia, pci, agp_nvidia_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_nvidia, hostb, agp_nvidia_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_nvidia, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_nvidia, pci, 1, 1, 1);
|
||||
|
@ -119,7 +119,6 @@ agp_sis_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_sis_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -293,6 +292,6 @@ static driver_t agp_sis_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_sis, pci, agp_sis_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_sis, hostb, agp_sis_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_sis, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_sis, pci, 1, 1, 1);
|
||||
|
@ -143,7 +143,6 @@ agp_via_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_via_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -363,6 +362,6 @@ static driver_t agp_via_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_via, pci, agp_via_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_via, hostb, agp_via_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_via, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_via, pci, 1, 1, 1);
|
||||
|
@ -85,7 +85,6 @@ agp_ali_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_ali_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -271,6 +270,6 @@ static driver_t agp_ali_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_ali, pci, agp_ali_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_ali, hostb, agp_ali_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_ali, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_ali, pci, 1, 1, 1);
|
||||
|
@ -207,7 +207,6 @@ agp_amd_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_amd_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -415,6 +414,6 @@ static driver_t agp_amd_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_amd, pci, agp_amd_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_amd, hostb, agp_amd_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_amd, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_amd, pci, 1, 1, 1);
|
||||
|
@ -155,7 +155,6 @@ agp_amd64_probe(device_t dev)
|
||||
if (resource_disabled("agp", device_get_unit(dev)))
|
||||
return ENXIO;
|
||||
if ((desc = agp_amd64_match(dev))) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -515,6 +514,6 @@ static driver_t agp_amd64_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_amd64, pci, agp_amd64_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_amd64, hostb, agp_amd64_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_amd64, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_amd64, pci, 1, 1, 1);
|
||||
|
@ -111,7 +111,6 @@ agp_ati_probe(device_t dev)
|
||||
|
||||
desc = agp_ati_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return 0;
|
||||
}
|
||||
@ -381,6 +380,6 @@ static driver_t agp_ati_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_ati, pci, agp_ati_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_ati, hostb, agp_ati_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_ati, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_ati, pci, 1, 1, 1);
|
||||
|
@ -134,7 +134,6 @@ agp_intel_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_intel_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -425,6 +424,6 @@ static driver_t agp_intel_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_intel, pci, agp_intel_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_intel, hostb, agp_intel_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_intel, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_intel, pci, 1, 1, 1);
|
||||
|
@ -121,7 +121,6 @@ agp_nvidia_probe (device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_nvidia_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
@ -460,6 +459,6 @@ static driver_t agp_nvidia_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_nvidia, pci, agp_nvidia_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_nvidia, hostb, agp_nvidia_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_nvidia, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_nvidia, pci, 1, 1, 1);
|
||||
|
@ -119,7 +119,6 @@ agp_sis_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_sis_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -293,6 +292,6 @@ static driver_t agp_sis_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_sis, pci, agp_sis_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_sis, hostb, agp_sis_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_sis, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_sis, pci, 1, 1, 1);
|
||||
|
@ -143,7 +143,6 @@ agp_via_probe(device_t dev)
|
||||
return (ENXIO);
|
||||
desc = agp_via_match(dev);
|
||||
if (desc) {
|
||||
device_verbose(dev);
|
||||
device_set_desc(dev, desc);
|
||||
return BUS_PROBE_DEFAULT;
|
||||
}
|
||||
@ -363,6 +362,6 @@ static driver_t agp_via_driver = {
|
||||
|
||||
static devclass_t agp_devclass;
|
||||
|
||||
DRIVER_MODULE(agp_via, pci, agp_via_driver, agp_devclass, 0, 0);
|
||||
DRIVER_MODULE(agp_via, hostb, agp_via_driver, agp_devclass, 0, 0);
|
||||
MODULE_DEPEND(agp_via, agp, 1, 1, 1);
|
||||
MODULE_DEPEND(agp_via, pci, 1, 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user