summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2004-12-08 18:00:46 +0000
committersos <sos@FreeBSD.org>2004-12-08 18:00:46 +0000
commit778b1dc628c61c5c0f119dd443df2d6074b09dae (patch)
treef5a6bb1dade4fa3b2b913906978a8de642ef329d /sys
parent071557e3014909bb8b910eb4e71b7efd491be2c5 (diff)
downloadFreeBSD-src-778b1dc628c61c5c0f119dd443df2d6074b09dae.zip
FreeBSD-src-778b1dc628c61c5c0f119dd443df2d6074b09dae.tar.gz
Update the ICH6 support so all 4 SATA channels can be used.
We still use "normal" mode, AHCI mode is in the works still. HW donated by: Sentex HW donated by: Yahoo!
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-chipset.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 4d8446b..6c20240 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -919,13 +919,21 @@ static void
ata_intel_reset(struct ata_channel *ch)
{
device_t parent = device_get_parent(ch->dev);
+ struct ata_pci_controller *ctlr = device_get_softc(parent);
int mask, timeout = 100;
- if (pci_read_config(parent, 0x90, 1) & 0x04)
- mask = 0x0003;
- else
- mask = (0x0001 << ch->unit);
-
+ /* ICH6 has 4 SATA ports as master/slave on 2 channels so deal with pairs */
+ if (ctlr->chip->chipid == ATA_I82801FB_S1 ||
+ ctlr->chip->chipid == ATA_I82801FB_R1) {
+ mask = (0x0005 << ch->unit);
+ }
+ else {
+ /* ICH5 in compat mode has SATA ports as master/slave on 1 channel */
+ if (pci_read_config(parent, 0x90, 1) & 0x04)
+ mask = 0x0003;
+ else
+ mask = (0x0001 << ch->unit);
+ }
pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) & ~mask, 2);
DELAY(10);
pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) | mask, 2);
OpenPOWER on IntegriCloud