summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-08-10 07:34:49 +0000
committersos <sos@FreeBSD.org>2000-08-10 07:34:49 +0000
commit937e4ba86d9feec57e270077050fe1ec9a365c2b (patch)
treeec2b12a785211e553b8a58d627257c3fc3802a36 /sys
parente08c336a4902f90c175e33d5b10a3205cdd6961f (diff)
downloadFreeBSD-src-937e4ba86d9feec57e270077050fe1ec9a365c2b.zip
FreeBSD-src-937e4ba86d9feec57e270077050fe1ec9a365c2b.tar.gz
Fix the ICH2 ATA100 support, and proberly downgrade the chip setup when
going to slower DMA modes on all Intel chips.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-dma.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 1d82ee7..9b6b266 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -120,18 +120,15 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
pci_write_config(parent, 0x48,
(pci_read_config(parent, 0x48, 4) &
~mask48) | new48, 4);
- pci_write_config(parent, 0x54, word54 & ~(0x1000<<devno),2);
+ pci_write_config(parent, 0x54, word54 | (0x1000<<devno), 2);
scp->mode[ATA_DEV(device)] = ATA_UDMA5;
return;
}
}
}
- if (udmamode >= 4) {
- int16_t word54;
-
- word54 = pci_read_config(parent, 0x54, 2);
- pci_write_config(parent, 0x54, word54 & ~(0x1000 << devno), 2);
- }
+ /* make sure eventual ATA100 mode from the BIOS is disabled */
+ pci_write_config(parent, 0x54,
+ pci_read_config(parent, 0x54, 2) & ~(0x1000<<devno),2);
/* FALLTHROUGH */
case 0x24118086: /* Intel ICH */
@@ -160,12 +157,9 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
}
}
}
- if (udmamode >= 2) {
- int16_t word54;
-
- word54 = pci_read_config(parent, 0x54, 2);
- pci_write_config(parent, 0x54, word54 & ~(1 << devno), 2);
- }
+ /* make sure eventual ATA66 mode from the BIOS is disabled */
+ pci_write_config(parent, 0x54,
+ pci_read_config(parent, 0x54, 2) & ~(1 << devno), 2);
/* FALLTHROUGH */
case 0x71118086: /* Intel PIIX4 */
@@ -192,6 +186,9 @@ ata_dmainit(struct ata_softc *scp, int32_t device,
return;
}
}
+ /* make sure eventual ATA33 mode from the BIOS is disabled */
+ pci_write_config(parent, 0x48,
+ pci_read_config(parent, 0x48, 4) & ~(1 << devno), 4);
/* FALLTHROUGH */
case 0x70108086: /* Intel PIIX3 */
OpenPOWER on IntegriCloud