summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/an/if_an_pci.c4
-rw-r--r--sys/dev/ar/if_ar_pci.c4
-rw-r--r--sys/dev/asr/asr.c2
-rw-r--r--sys/dev/ata/ata-disk.c30
-rw-r--r--sys/dev/ath/if_ath_pci.c2
-rw-r--r--sys/dev/bfe/if_bfe.c2
-rw-r--r--sys/dev/bktr/bktr_os.c8
7 files changed, 41 insertions, 11 deletions
diff --git a/sys/dev/an/if_an_pci.c b/sys/dev/an/if_an_pci.c
index 67d27a3..5098f50 100644
--- a/sys/dev/an/if_an_pci.c
+++ b/sys/dev/an/if_an_pci.c
@@ -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);
diff --git a/sys/dev/ar/if_ar_pci.c b/sys/dev/ar/if_ar_pci.c
index 0815d5e..9b88c7c 100644
--- a/sys/dev/ar/if_ar_pci.c
+++ b/sys/dev/ar/if_ar_pci.c
@@ -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");
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index e8badb6..deb632c 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -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 */
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index eebde22..2a338c6 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -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);
diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c
index 82f0376..cb176f0 100644
--- a/sys/dev/ath/if_ath_pci.c
+++ b/sys/dev/ath/if_ath_pci.c
@@ -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;
}
diff --git a/sys/dev/bfe/if_bfe.c b/sys/dev/bfe/if_bfe.c
index d4a9694..ad5ef06 100644
--- a/sys/dev/bfe/if_bfe.c
+++ b/sys/dev/bfe/if_bfe.c
@@ -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++;
}
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index aed1942..27519bc 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -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;
}
};
OpenPOWER on IntegriCloud