From 50f97a758441dc1ae4bfdb68f4a6e2740eba3656 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 23 Nov 2009 18:07:28 +0000 Subject: [PATCH] Do not attach JMicrons with single PCI function. They are not working as AHCI for some reason, even when declaring so. Let atajmicron configure them for us and provide PATA support. --- sys/dev/ahci/ahci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 2d21c0506e1..459aa64a465 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -254,6 +254,10 @@ ahci_probe(device_t dev) for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + /* Do not attach JMicrons with single PCI function. */ + if (pci_get_vendor(dev) == 0x197b && + (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) + return (ENXIO); snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); -- 2.45.2