Proberly back down DMA modes on the Acer Aladdin.

This commit is contained in:
Søren Schmidt 2000-12-19 10:37:03 +00:00
parent 315a164546
commit 43a181118f
2 changed files with 13 additions and 5 deletions

View File

@ -264,7 +264,10 @@ ata_pci_match(device_t dev)
return "Intel ICH2 ATA100 controller";
case 0x522910b9:
return "AcerLabs Aladdin ATA33 controller";
if (pci_get_revid(dev) < 0x20)
return "AcerLabs Aladdin ATA controller";
else
return "AcerLabs Aladdin ATA33 controller";
case 0x05711106:
if (ata_find_dev(dev, 0x05861106, 0))

View File

@ -311,6 +311,11 @@ ata_dmainit(struct ata_softc *scp, int device,
return;
}
}
/* make sure eventual UDMA mode from the BIOS is disabled */
pci_write_config(parent, 0x54,
pci_read_config(parent, 0x54, 4) & ~0x88880000, 4);
if (wdmamode >= 2 && apiomode >= 4) {
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
@ -577,8 +582,6 @@ ata_dmainit(struct ata_softc *scp, int device,
case 0x02111166: /* ServerWorks ROSB4 ATA33 controller */
if (udmamode >= 2) {
u_int16_t reg56;
error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
if (bootverbose)
@ -586,6 +589,8 @@ ata_dmainit(struct ata_softc *scp, int device,
"%s setting UDMA2 on ServerWorks chip\n",
(error) ? "failed" : "success");
if (!error) {
u_int16_t reg56;
pci_write_config(parent, 0x54,
pci_read_config(parent, 0x54, 1) |
(0x01 << devno), 1);
@ -897,8 +902,8 @@ cyrix_timing(struct ata_softc *scp, int devno, int mode)
case ATA_WDMA2: reg24 = 0x00002020; break;
case ATA_UDMA2: reg24 = 0x00911030; break;
}
outl(scp->bmaddr + (devno * 8) + 0x20, reg20);
outl(scp->bmaddr + (devno * 8) + 0x24, reg24);
outl(scp->bmaddr + (devno << 3) + 0x20, reg20);
outl(scp->bmaddr + (devno << 3) + 0x24, reg24);
}
static void