1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Add support for the Cenatek Rocket Drive.

This commit is contained in:
Søren Schmidt 2002-02-12 16:59:28 +00:00
parent b389e7aaef
commit d99689e95c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90572
2 changed files with 14 additions and 2 deletions

View File

@ -1004,6 +1004,15 @@ ata_dmainit(struct ata_channel *ch, int device,
atadev->mode = ATA_PIO0 + apiomode;
return;
case 0x000116ca: /* Cenatek Rocket Drive controller */
if (wdmamode >= 0 &&
(ATA_INB(ch->r_bmio, ATA_BMSTAT_PORT) &
((device==ATA_MASTER)?ATA_BMSTAT_DMA_MASTER:ATA_BMSTAT_DMA_SLAVE)))
atadev->mode = ATA_DMA;
else
atadev->mode = ATA_PIO;
return;
default: /* unknown controller chip */
/* better not try generic DMA on ATAPI devices it almost never works */
if ((device == ATA_MASTER && ch->devices & ATA_ATAPI_MASTER) ||
@ -1012,7 +1021,7 @@ ata_dmainit(struct ata_channel *ch, int device,
/* if controller says its setup for DMA take the easy way out */
/* the downside is we dont know what DMA mode we are in */
if ((udmamode >= 0 || wdmamode > 1) &&
if ((udmamode >= 0 || wdmamode >= 2) &&
(ATA_INB(ch->r_bmio, ATA_BMSTAT_PORT) &
((device==ATA_MASTER) ?
ATA_BMSTAT_DMA_MASTER : ATA_BMSTAT_DMA_SLAVE))) {
@ -1034,7 +1043,7 @@ ata_dmainit(struct ata_channel *ch, int device,
}
}
error = ata_command(atadev, ATA_C_SETFEATURES, 0, ATA_PIO0 + apiomode,
ATA_C_F_SETXFER,ATA_WAIT_READY);
ATA_C_F_SETXFER, ATA_WAIT_READY);
if (bootverbose)
ata_prtdev(atadev, "%s setting PIO%d on generic chip\n",
(error) ? "failed" : "success", apiomode < 0 ? 0 : apiomode);

View File

@ -283,6 +283,9 @@ ata_pci_match(device_t dev)
}
return NULL;
case 0x000116ca:
return "Cenatek Rocket Drive controller";
/* unsupported but known chipsets, generic DMA only */
case 0x10001042:
case 0x10011042: