From 05c84db123699ef6ff439305e99d96f928da3a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Sun, 5 Jun 2005 18:37:56 +0000 Subject: [PATCH] Unbreak the ICH6 AHCI support in !48Bit mode. --- sys/dev/ata/ata-chipset.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 1c0541c5bef1..c640fe226993 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -417,7 +417,11 @@ ata_ahci_setup_fis(u_int8_t *fis, struct ata_request *request) fis[idx++] = request->u.ata.lba; fis[idx++] = request->u.ata.lba >> 8; fis[idx++] = request->u.ata.lba >> 16; - fis[idx++] = ATA_D_LBA | atadev->unit; + fis[idx] = ATA_D_LBA | atadev->unit; + if (atadev->flags & ATA_D_48BIT_ACTIVE) + idx++; + else + fis[idx++] |= (request->u.ata.lba >> 24 & 0x0f); fis[idx++] = request->u.ata.lba >> 24; fis[idx++] = request->u.ata.lba >> 32; @@ -1498,7 +1502,8 @@ ata_intel_reset(device_t dev) /* 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) { + ctlr->chip->chipid == ATA_I82801FB_R1 || + ctlr->chip->chipid == ATA_I82801FB_M) { mask = (0x0005 << ch->unit); } else {