From d3fd8d85fcf5507c669471c1dfea3cb66881d8ab Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Wed, 13 Jun 2007 17:44:49 +0000 Subject: [PATCH] Do not attempt to enable AHCI mode on ALi SATA controllers other than the 5288. It is not correctly implemented in earlier silicon, and the BIOS often lies about AHCI capability on platforms where these chips are deployed. With this change I am able to boot FreeBSD on the ASUS Vintage AH-1 barebones system. Approved by: sos --- sys/dev/ata/ata-chipset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index e37083c975e..6d28afbd451 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -1005,7 +1005,10 @@ ata_ali_chipinit(device_t dev) /* if we have a memory resource we can likely do AHCI */ ctlr->r_type2 = SYS_RES_MEMORY; ctlr->r_rid2 = PCIR_BAR(5); - if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, + + /* AHCI mode is correctly supported only on the ALi 5288. */ + if ((ctlr->chip->chipid == ATA_ALI_5288) && + (ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, &ctlr->r_rid2, RF_ACTIVE))) return ata_ahci_chipinit(dev);