1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

Use BUS_PROBE_DEFAULT for pci probe return value

This commit is contained in:
Warner Losh 2005-03-05 19:06:12 +00:00
parent 1e8c38a6cc
commit 53ee71735f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143163
7 changed files with 41 additions and 11 deletions

View File

@ -125,7 +125,7 @@ an_probe_pci(device_t dev)
if (pci_get_vendor(dev) == t->an_vid &&
pci_get_device(dev) == t->an_did) {
device_set_desc(dev, t->an_name);
return(0);
return(BUS_PROBE_DEFAULT);
}
t++;
}
@ -133,7 +133,7 @@ an_probe_pci(device_t dev)
if (pci_get_vendor(dev) == AIRONET_VENDORID &&
pci_get_device(dev) == AIRONET_DEVICEID_MPI350) {
device_set_desc(dev, "Cisco Aironet MPI350");
return(0);
return(BUS_PROBE_DEFAULT);
}
return(ENXIO);

View File

@ -84,7 +84,7 @@ ar_pci_probe(device_t device)
switch(type) {
case 0x5012114f:
device_set_desc(device, "Digi SYNC/570i-PCI 2 port");
return (0);
return (BUS_PROBE_DEFAULT);
break;
case 0x5010114f:
printf("Digi SYNC/570i-PCI 2 port (mapped below 1M)\n");
@ -92,7 +92,7 @@ ar_pci_probe(device_t device)
break;
case 0x5013114f:
device_set_desc(device, "Digi SYNC/570i-PCI 4 port");
return (0);
return (BUS_PROBE_DEFAULT);
break;
case 0x5011114f:
printf("Digi SYNC/570i-PCI 4 port (mapped below 1M)\n");

View File

@ -659,7 +659,7 @@ asr_probe(device_t tag)
id = (pci_get_device(tag) << 16) | pci_get_vendor(tag);
if ((id == 0xA5011044) || (id == 0xA5111044)) {
device_set_desc(tag, "Adaptec Caching SCSI RAID");
return (-10);
return (BUS_PROBE_DEFAULT);
}
return (ENXIO);
} /* asr_probe */

View File

@ -92,6 +92,36 @@ ad_attach(struct ata_device *atadev)
adp->heads = atadev->param->heads;
adp->sectors = atadev->param->sectors;
adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors;
#ifdef PC98
/*
* During the BOOT process, the PC-98 BIOS sets fake geometry of
* xxxx/8/17 of the disk using 'INITIALIZE DEVICE PARAMETER (91h)'
* command. After this command, all access to the drive must be done
* via the new, fake geometry, rather than the old, native format.
* With ATA/ATAPI-6 or later, these parameters are obsolete, but
* PC-98s are still using them.
*
* This only really matters when we're talking to disks using CHS
* mode, not LBA mode. The CHS mode disks are still relatively
* common in these machines, so that case must be addressed.
*
* (ITF sets new CHS geometry to initialized disks.)
*
* obsolete54[0]: current cylinder
* obsolete54[1]: current heads
* obsolete54[2]: current sectors
* obsolete54[3-4]: current capacities(multiplied above 3 values)
*/
/* Get CHS geometry from set by Initialize Device Parameters command. */
if ((atadev->param->atavalid & ATA_FLAG_54_58) ||
(atadev->param->obsolete54[0] != 0 &&
atadev->param->obsolete54[1] != 0 &&
atadev->param->obsolete54[2] != 0)) {
adp->heads = atadev->param->obsolete54[1];
adp->sectors = atadev->param->obsolete54[2];
adp->total_secs = *(u_int32_t*)&(atadev->param->obsolete54[3]);
}
#endif
mtx_init(&adp->queue_mtx, "ATA disk bioqueue lock", NULL, MTX_DEF);
bioq_init(&adp->queue);

View File

@ -90,7 +90,7 @@ ath_pci_probe(device_t dev)
devname = ath_hal_probe(pci_get_vendor(dev), pci_get_device(dev));
if (devname != NULL) {
device_set_desc(dev, devname);
return 0;
return BUS_PROBE_DEFAULT;
}
return ENXIO;
}

View File

@ -182,7 +182,7 @@ bfe_probe(device_t dev)
if ((pci_get_vendor(dev) == t->bfe_vid) &&
(pci_get_device(dev) == t->bfe_did)) {
device_set_desc_copy(dev, t->bfe_name);
return (0);
return (BUS_PROBE_DEFAULT);
}
t++;
}

View File

@ -285,16 +285,16 @@ bktr_probe( device_t dev )
device_set_desc(dev, "BrookTree 848A");
else
device_set_desc(dev, "BrookTree 848");
return 0;
return BUS_PROBE_DEFAULT;
case PCI_PRODUCT_BROOKTREE_BT849:
device_set_desc(dev, "BrookTree 849A");
return 0;
return BUS_PROBE_DEFAULT;
case PCI_PRODUCT_BROOKTREE_BT878:
device_set_desc(dev, "BrookTree 878");
return 0;
return BUS_PROBE_DEFAULT;
case PCI_PRODUCT_BROOKTREE_BT879:
device_set_desc(dev, "BrookTree 879");
return 0;
return BUS_PROBE_DEFAULT;
}
};