From a2e81fc93f4273fc79567fc60405bfcf7d210748 Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 5 Mar 2005 18:30:12 +0000 Subject: [PATCH] Use BUS_PROBE_DEFAULT for pci probe return value --- sys/dev/ciss/ciss.c | 2 +- sys/dev/cp/if_cp.c | 2 +- sys/dev/cy/cy_pci.c | 2 +- sys/dev/digi/digi_pci.c | 2 +- sys/dev/dpt/dpt_pci.c | 2 +- sys/dev/ed/if_ed_pci.c | 9 +++--- sys/dev/em/if_em.c | 4 +-- sys/dev/en/if_en_pci.c | 4 +-- sys/dev/fatm/if_fatm.c | 2 +- sys/dev/fb/s3_pci.c | 2 +- sys/dev/firewire/fwohci_pci.c | 58 +++++++++++++++++------------------ sys/dev/fxp/if_fxp.c | 2 +- sys/dev/gem/if_gem_pci.c | 2 +- sys/dev/hatm/if_hatm.c | 2 +- sys/dev/hfa/hfa_pci.c | 2 +- sys/dev/hifn/hifn7751.c | 6 ++-- sys/dev/hme/if_hme_pci.c | 2 +- 17 files changed, 52 insertions(+), 53 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index b0e26055d19f..789efb7d3f4b 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -314,7 +314,7 @@ ciss_probe(device_t dev) i = ciss_lookup(dev); if (i != -1) { device_set_desc(dev, ciss_vendor_data[i].desc); - return(-10); + return(BUS_PROBE_DEFAULT); } return(ENOENT); } diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c index 2422c6dbe839..df8f7ce234cf 100644 --- a/sys/dev/cp/if_cp.c +++ b/sys/dev/cp/if_cp.c @@ -224,7 +224,7 @@ static int cp_probe (device_t dev) if ((pci_get_vendor (dev) == cp_vendor_id) && (pci_get_device (dev) == cp_device_id)) { device_set_desc (dev, "Cronyx-Tau-PCI serial adapter"); - return 0; + return BUS_PROBE_DEFAULT; } return ENXIO; } diff --git a/sys/dev/cy/cy_pci.c b/sys/dev/cy/cy_pci.c index dd119e9145a2..2d072359e07b 100644 --- a/sys/dev/cy/cy_pci.c +++ b/sys/dev/cy/cy_pci.c @@ -96,7 +96,7 @@ cy_pci_probe(dev) if (device_id != 0x0100120e && device_id != 0x0101120e) return (ENXIO); device_set_desc(dev, "Cyclades Cyclom-Y Serial Adapter"); - return (0); + return (BUS_PROBE_DEFAULT); } static int diff --git a/sys/dev/digi/digi_pci.c b/sys/dev/digi/digi_pci.c index fafa5a1fbf08..342858e5774e 100644 --- a/sys/dev/digi/digi_pci.c +++ b/sys/dev/digi/digi_pci.c @@ -91,7 +91,7 @@ digi_pci_probe(device_t dev) case PCI_DEVICE_920_4: case PCI_DEVICE_920_8: case PCI_DEVICE_920_2: - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c index a3fa41ba280f..309f9ac9b412 100644 --- a/sys/dev/dpt/dpt_pci.c +++ b/sys/dev/dpt/dpt_pci.c @@ -68,7 +68,7 @@ dpt_pci_probe (device_t dev) if ((pci_get_vendor(dev) == DPT_VENDOR_ID) && (pci_get_device(dev) == DPT_DEVICE_ID)) { device_set_desc(dev, "DPT Caching SCSI RAID Controller"); - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); } diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c index 036879103c5a..b4bef3e30ab3 100644 --- a/sys/dev/ed/if_ed_pci.c +++ b/sys/dev/ed/if_ed_pci.c @@ -69,11 +69,10 @@ ed_pci_probe(device_t dev) while (ep->type && ep->type != type) ++ep; - if (ep->desc) { - device_set_desc(dev, ep->desc); - return (0); - } - return (ENXIO); + if (ep->desc == NULL) + return (ENXIO); + device_set_desc(dev, ep->desc); + return (BUS_PROBE_DEFAULT); } static int diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 525074d2ba24..0ab82a8aa7de 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -231,7 +231,7 @@ TUNABLE_INT("hw.em.rx_abs_int_delay", &em_rx_abs_int_delay_dflt); * em_probe determines if the driver should be loaded on * adapter based on PCI vendor/device id of the adapter. * - * return 0 on success, positive on failure + * return BUS_PROBE_DEFAULT on success, positive on failure *********************************************************************/ static int @@ -269,7 +269,7 @@ em_probe(device_t dev) em_strings[ent->index], em_driver_version); device_set_desc_copy(dev, adapter_name); - return(0); + return(BUS_PROBE_DEFAULT); } ent++; } diff --git a/sys/dev/en/if_en_pci.c b/sys/dev/en/if_en_pci.c index 1aaf76108b82..84093522b26e 100644 --- a/sys/dev/en/if_en_pci.c +++ b/sys/dev/en/if_en_pci.c @@ -170,7 +170,7 @@ en_pci_probe(device_t dev) case PCI_PRODUCT_EFFICIENTNETS_ENI155PF: case PCI_PRODUCT_EFFICIENTNETS_ENI155PA: device_set_desc(dev, "Efficient Networks ENI-155p"); - return (0); + return (BUS_PROBE_DEFAULT); } break; @@ -180,7 +180,7 @@ en_pci_probe(device_t dev) case PCI_PRODUCT_ADP_AIC5900: case PCI_PRODUCT_ADP_AIC5905: device_set_desc(dev, "Adaptec 155 ATM"); - return (0); + return (BUS_PROBE_DEFAULT); } break; } diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c index 35ef8b9fffaf..e20ab085c094 100644 --- a/sys/dev/fatm/if_fatm.c +++ b/sys/dev/fatm/if_fatm.c @@ -129,7 +129,7 @@ fatm_probe(device_t dev) if (pci_get_vendor(dev) == fatm_devs[i].vid && pci_get_device(dev) == fatm_devs[i].did) { device_set_desc(dev, fatm_devs[i].name); - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); } diff --git a/sys/dev/fb/s3_pci.c b/sys/dev/fb/s3_pci.c index 6096bdf932f0..70f3b6bfc0a4 100644 --- a/sys/dev/fb/s3_pci.c +++ b/sys/dev/fb/s3_pci.c @@ -456,7 +456,7 @@ s3pci_probe(device_t dev) bus_set_resource(dev, SYS_RES_IOPORT, 1, S3_ENHANCED_IO, S3_ENHANCED_IO_SIZE); - return 0; + return BUS_PROBE_DEFAULT; }; diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index 154f0dfb4980..a9d0dde887b6 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -97,116 +97,116 @@ fwohci_pci_probe( device_t dev ) id = pci_get_devid(dev); if (id == (FW_VENDORID_NATSEMI | FW_DEVICE_CS4210)) { device_set_desc(dev, "National Semiconductor CS4210"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD861)) { device_set_desc(dev, "NEC uPD72861"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD871)) { device_set_desc(dev, "NEC uPD72871/2"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD72870)) { device_set_desc(dev, "NEC uPD72870"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD72873)) { device_set_desc(dev, "NEC uPD72873"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD72874)) { device_set_desc(dev, "NEC uPD72874"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_SIS | FW_DEVICE_7007)) { /* It has no real identifier, using device id. */ device_set_desc(dev, "SiS 7007"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB22)) { device_set_desc(dev, "Texas Instruments TSB12LV22"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB23)) { device_set_desc(dev, "Texas Instruments TSB12LV23"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB26)) { device_set_desc(dev, "Texas Instruments TSB12LV26"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB43)) { device_set_desc(dev, "Texas Instruments TSB43AA22"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB43A)) { device_set_desc(dev, "Texas Instruments TSB43AB22/A"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB43AB21)) { device_set_desc(dev, "Texas Instruments TSB43AB21/A/AI/A-EP"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB43AB23)) { device_set_desc(dev, "Texas Instruments TSB43AB23"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB82AA2)) { device_set_desc(dev, "Texas Instruments TSB82AA2"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TIPCI4450)) { device_set_desc(dev, "Texas Instruments PCI4450"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TIPCI4410A)) { device_set_desc(dev, "Texas Instruments PCI4410A"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_TI | FW_DEVICE_TIPCI4451)) { device_set_desc(dev, "Texas Instruments PCI4451"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_SONY | FW_DEVICE_CXD1947)) { device_set_desc(dev, "Sony i.LINK (CXD1947)"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_SONY | FW_DEVICE_CXD3222)) { device_set_desc(dev, "Sony i.LINK (CXD3222)"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_VIA | FW_DEVICE_VT6306)) { device_set_desc(dev, "VIA Fire II (VT6306)"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_RICOH | FW_DEVICE_R5C551)) { device_set_desc(dev, "Ricoh R5C551"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_RICOH | FW_DEVICE_R5C552)) { device_set_desc(dev, "Ricoh R5C552"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_APPLE | FW_DEVICE_PANGEA)) { device_set_desc(dev, "Apple Pangea"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_APPLE | FW_DEVICE_UNINORTH)) { device_set_desc(dev, "Apple UniNorth"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_LUCENT | FW_DEVICE_FW322)) { device_set_desc(dev, "Lucent FW322/323"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_INTEL | FW_DEVICE_82372FB)) { device_set_desc(dev, "Intel 82372FB"); - return 0; + return BUS_PROBE_DEFAULT; } if (id == (FW_VENDORID_ADAPTEC | FW_DEVICE_AIC5800)) { device_set_desc(dev, "Adaptec AHA-894x/AIC-5800"); - return 0; + return BUS_PROBE_DEFAULT; } #endif if (pci_get_class(dev) == PCIC_SERIALBUS @@ -216,7 +216,7 @@ fwohci_pci_probe( device_t dev ) device_printf(dev, "vendor=%x, dev=%x\n", pci_get_vendor(dev), pci_get_device(dev)); device_set_desc(dev, "1394 Open Host Controller Interface"); - return 0; + return BUS_PROBE_DEFAULT; } return ENXIO; diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 76be7d5ccfa9..d1e15db4aaa6 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -342,7 +342,7 @@ fxp_probe(device_t dev) if (ident->devid == devid && (ident->revid == revid || ident->revid == -1)) { device_set_desc(dev, ident->name); - return (0); + return (BUS_PROBE_DEFAULT); } } } diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c index 58988900e86f..57c95c7a0821 100644 --- a/sys/dev/gem/if_gem_pci.c +++ b/sys/dev/gem/if_gem_pci.c @@ -149,7 +149,7 @@ gem_pci_probe(dev) gsc = device_get_softc(dev); gsc->gsc_gem.sc_variant = gem_pci_devlist[i].gpd_variant; - return (0); + return (BUS_PROBE_DEFAULT); } } diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index cf5b182cfd2f..e1f912868e87 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -175,7 +175,7 @@ hatm_probe(device_t dev) if (pci_get_vendor(dev) == hatm_devs[i].vid && pci_get_device(dev) == hatm_devs[i].did) { device_set_desc(dev, hatm_devs[i].name); - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); } diff --git a/sys/dev/hfa/hfa_pci.c b/sys/dev/hfa/hfa_pci.c index b6cc311ebd65..8fc59ed780de 100644 --- a/sys/dev/hfa/hfa_pci.c +++ b/sys/dev/hfa/hfa_pci.c @@ -110,7 +110,7 @@ hfa_pci_probe (dev) if ((pci_get_vendor(dev) == FORE_VENDOR_ID) && (pci_get_device(dev) == FORE_PCA200EPC_ID)) { device_set_desc(dev, "FORE Systems PCA-200EPC ATM"); - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index a4354949e78f..38e36b740a29 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -193,17 +193,17 @@ hifn_probe(device_t dev) { if (pci_get_vendor(dev) == PCI_VENDOR_INVERTEX && pci_get_device(dev) == PCI_PRODUCT_INVERTEX_AEON) - return (0); + return (BUS_PROBE_DEFAULT); if (pci_get_vendor(dev) == PCI_VENDOR_HIFN && (pci_get_device(dev) == PCI_PRODUCT_HIFN_7751 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7951 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7955 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7956 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7811)) - return (0); + return (BUS_PROBE_DEFAULT); if (pci_get_vendor(dev) == PCI_VENDOR_NETSEC && pci_get_device(dev) == PCI_PRODUCT_NETSEC_7751) - return (0); + return (BUS_PROBE_DEFAULT); return (ENXIO); } diff --git a/sys/dev/hme/if_hme_pci.c b/sys/dev/hme/if_hme_pci.c index 929c2868d7cc..a2833f2f63b7 100644 --- a/sys/dev/hme/if_hme_pci.c +++ b/sys/dev/hme/if_hme_pci.c @@ -129,7 +129,7 @@ hme_pci_probe(device_t dev) if (pci_get_vendor(dev) == PCI_VENDOR_SUN && pci_get_device(dev) == PCI_PRODUCT_SUN_HMENETWORK) { device_set_desc(dev, "Sun HME 10/100 Ethernet"); - return (0); + return (BUS_PROBE_DEFAULT); } return (ENXIO); }