Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return

BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.
This commit is contained in:
Warner Losh 2005-03-01 07:50:12 +00:00
parent 41766826eb
commit 2ece8174c1
14 changed files with 26 additions and 28 deletions

View File

@ -120,25 +120,25 @@ tdfx_probe(device_t dev)
/*
* probe routine called on kernel boot to register supported devices. We get
* a device structure to work with, and we can test the VENDOR/DEVICE IDs to
* see if this PCI device is one that we support. Return 0 if yes, ENXIO if
* not.
* see if this PCI device is one that we support. Return BUS_PRROBE_DEFAULT
* if yes, ENXIO if not.
*/
switch(pci_get_devid(dev)) {
case PCI_DEVICE_ALLIANCE_AT3D:
device_set_desc(dev, "ProMotion At3D 3D Accelerator");
return 0;
return BUS_PROBE_DEFAULT;
case PCI_DEVICE_3DFX_VOODOO2:
device_set_desc(dev, "3DFX Voodoo II 3D Accelerator");
return 0;
return BUS_PROBE_DEFAULT;
/*case PCI_DEVICE_3DFX_BANSHEE:
device_set_desc(dev, "3DFX Voodoo Banshee 2D/3D Graphics Accelerator");
return 0;
return BUS_PROBE_DEFAULT;
case PCI_DEVICE_3DFX_VOODOO3:
device_set_desc(dev, "3DFX Voodoo3 2D/3D Graphics Accelerator");
return 0;*/
return BUS_PROBE_DEFAULT;*/
case PCI_DEVICE_3DFX_VOODOO1:
device_set_desc(dev, "3DFX Voodoo Graphics 3D Accelerator");
return 0;;
return BUS_PROBE_DEFAULT;
};
return ENXIO;

View File

@ -121,7 +121,7 @@ tga_probe(device_t dev)
if((pci_get_vendor(dev) == t->vendor_id) &&
(pci_get_device(dev) == t->device_id)) {
device_set_desc(dev, t->name);
error = 0;
error = BUS_PROBE_DEFAULT;
break;
}
t++;

View File

@ -3693,11 +3693,11 @@ trm_probe(device_t dev)
case PCI_DEVICEID_TRMS1040:
device_set_desc(dev,
"Tekram DC395U/UW/F DC315/U Fast20 Wide SCSI Adapter");
return (0);
return (BUS_PROBE_DEFAULT);
case PCI_DEVICEID_TRMS2080:
device_set_desc(dev,
"Tekram DC395U2D/U2W Fast40 Wide SCSI Adapter");
return 0;
return (BUS_PROBE_DEFAULT);
default:
return (ENXIO);
}

View File

@ -196,7 +196,7 @@ twa_probe(device_t dev)
TWA_DRIVER_VERSION_STRING);
first_ctlr = 0;
}
return(0);
return(BUS_PROBE_DEFAULT);
}
return(ENXIO);
}

View File

@ -163,7 +163,7 @@ twe_probe(device_t dev)
((pci_get_device(dev) == TWE_DEVICE_ID) ||
(pci_get_device(dev) == TWE_DEVICE_ID_ASIC))) {
device_set_desc_copy(dev, TWE_DEVICE_NAME ". Driver version " TWE_DRIVER_VERSION_STRING);
return(0);
return(BUS_PROBE_DEFAULT);
}
return(ENXIO);
}

View File

@ -169,7 +169,7 @@ epic_probe(dev)
if (t != NULL) {
device_set_desc(dev, t->name);
return (0);
return (BUS_PROBE_DEFAULT);
}
return (ENXIO);

View File

@ -202,7 +202,7 @@ txp_probe(dev)
if ((pci_get_vendor(dev) == t->txp_vid) &&
(pci_get_device(dev) == t->txp_did)) {
device_set_desc(dev, t->txp_name);
return(0);
return(BUS_PROBE_DEFAULT);
}
t++;
}

View File

@ -199,11 +199,11 @@ ubsec_probe(device_t dev)
if (pci_get_vendor(dev) == PCI_VENDOR_SUN &&
(pci_get_device(dev) == PCI_PRODUCT_SUN_5821 ||
pci_get_device(dev) == PCI_PRODUCT_SUN_SCA1K))
return (0);
return (BUS_PROBE_DEFAULT);
if (pci_get_vendor(dev) == PCI_VENDOR_BLUESTEEL &&
(pci_get_device(dev) == PCI_PRODUCT_BLUESTEEL_5501 ||
pci_get_device(dev) == PCI_PRODUCT_BLUESTEEL_5601))
return (0);
return (BUS_PROBE_DEFAULT);
if (pci_get_vendor(dev) == PCI_VENDOR_BROADCOM &&
(pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5801 ||
pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5802 ||
@ -213,7 +213,7 @@ ubsec_probe(device_t dev)
pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5822 ||
pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823
))
return (0);
return (BUS_PROBE_DEFAULT);
return (ENXIO);
}

View File

@ -176,7 +176,7 @@ ehci_pci_probe(device_t self)
if (desc) {
device_set_desc(self, desc);
return 0;
return BUS_PROBE_DEFAULT;
} else {
return ENXIO;
}

View File

@ -202,7 +202,7 @@ ohci_pci_probe(device_t self)
if (desc) {
device_set_desc(self, desc);
return 0;
return BUS_PROBE_DEFAULT;
} else {
return ENXIO;
}

View File

@ -255,7 +255,7 @@ uhci_pci_probe(device_t self)
if (desc) {
device_set_desc(self, desc);
return 0;
return BUS_PROBE_DEFAULT;
} else {
return ENXIO;
}

View File

@ -680,7 +680,7 @@ vge_probe(dev)
if ((pci_get_vendor(dev) == t->vge_vid) &&
(pci_get_device(dev) == t->vge_did)) {
device_set_desc(dev, t->vge_name);
return (0);
return (BUS_PROBE_DEFAULT);
}
t++;
}

View File

@ -94,28 +94,26 @@ vx_pci_probe(device_t dev)
if (device_id == 0x590010b7ul) {
device_set_desc(dev, "3COM 3C590 Etherlink III PCI");
return (0);
return (BUS_PROBE_DEFAULT);
}
if (device_id == 0x595010b7ul || device_id == 0x595110b7ul ||
device_id == 0x595210b7ul) {
device_set_desc(dev, "3COM 3C595 Etherlink III PCI");
return (0);
return (BUS_PROBE_DEFAULT);
}
/*
* The (Fast) Etherlink XL adapters are now supported by
* the xl driver, which uses bus master DMA and is much
* faster. (And which also supports the 3c905B.
*/
#ifdef VORTEX_ETHERLINK_XL
if (device_id == 0x900010b7ul || device_id == 0x900110b7ul) {
device_set_desc(dev, "3COM 3C900 Etherlink XL PCI");
return (0);
return (BUS_PROBE_LOW_PRIORITY);
}
if (device_id == 0x905010b7ul || device_id == 0x905110b7ul) {
device_set_desc(dev, "3COM 3C905 Etherlink XL PCI");
return (0);
return (BUS_PROBE_LOW_PRIORITY);
}
#endif
return (ENXIO);
}

View File

@ -128,7 +128,7 @@ wi_pci_probe(dev)
(pci_get_device(dev) == pci_ids[i].device)) {
sc->wi_bus_type = pci_ids[i].bus_type;
device_set_desc(dev, pci_ids[i].desc);
return (0);
return (BUS_PROBE_DEFAULT);
}
}
return(ENXIO);