summaryrefslogtreecommitdiffstats
path: root/sys/dev/ahci
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-11-23 18:07:28 +0000
committermav <mav@FreeBSD.org>2009-11-23 18:07:28 +0000
commit50f97a758441dc1ae4bfdb68f4a6e2740eba3656 (patch)
tree5667a82592047f8f7edc9fe1bbde62c802b0139f /sys/dev/ahci
parent5ca6063e7ac9d5a6d4c779de09ce3f21674d67ec (diff)
downloadFreeBSD-src-50f97a758441dc1ae4bfdb68f4a6e2740eba3656.zip
FreeBSD-src-50f97a758441dc1ae4bfdb68f4a6e2740eba3656.tar.gz
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.
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r--sys/dev/ahci/ahci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 2d21c05..459aa64 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);
OpenPOWER on IntegriCloud