This should be the way PC98 ATA disks are seen geometry wise.

Should go into 5_0_RELEASE as well.
This commit is contained in:
Søren Schmidt 2002-12-17 16:26:22 +00:00
parent dd0879a966
commit 5dd009808a
3 changed files with 10 additions and 4 deletions

View File

@ -213,9 +213,10 @@ struct ata_channel {
int flags; /* controller flags */
#define ATA_NO_SLAVE 0x01
#define ATA_USE_16BIT 0x02
#define ATA_ATAPI_DMA_RO 0x04
#define ATA_QUEUED 0x08
#define ATA_DMA_ACTIVE 0x10
#define ATA_USE_PC98GEOM 0x04
#define ATA_ATAPI_DMA_RO 0x08
#define ATA_QUEUED 0x10
#define ATA_DMA_ACTIVE 0x20
struct ata_device device[2]; /* devices on this channel */
#define MASTER 0x00

View File

@ -239,7 +239,7 @@ ata_cbussub_probe(device_t dev)
ch->unit = i;
}
free(children, M_TEMP);
ch->flags |= ATA_USE_16BIT;
ch->flags |= ATA_USE_16BIT | ATA_USE_PC98GEOM;
ch->intr_func = ata_cbus_intr;
ch->lock_func = ata_cbus_banking;
return ata_probe(dev);

View File

@ -124,6 +124,11 @@ ad_attach(struct ata_device *atadev)
adp->sectors = atadev->param->sectors;
adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors;
adp->max_iosize = 256 * DEV_BSIZE;
if (adp->device->channel->flags & ATA_USE_PC98GEOM &&
adp->total_secs < 17 * 8 * 65536) {
adp->sectors = 17;
adp->heads = 8;
}
bioq_init(&adp->queue);
lbasize = (u_int32_t)atadev->param->lba_size_1 |