diff options
author | mav <mav@FreeBSD.org> | 2011-12-02 12:52:33 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2011-12-02 12:52:33 +0000 |
commit | 9be1bfa322fff9a906d73bb1d09940d86d489415 (patch) | |
tree | 040e683bc3ac608cf9ff74f030ce4a869cacf0a0 /sys/dev/ahci | |
parent | 2105513eb4dae9b2f0b771b8d025a33650eba4ab (diff) | |
download | FreeBSD-src-9be1bfa322fff9a906d73bb1d09940d86d489415.zip FreeBSD-src-9be1bfa322fff9a906d73bb1d09940d86d489415.tar.gz |
Add hw.ahci.force tunable to control whether AHCI drivers should attach
to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation.
Enabled by default to get additional performance and functionality of AHCI
when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if
needed for some reason.
MFC after: 1 month
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r-- | sys/dev/ahci/ahci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index afa4b99..df4f66a 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -291,6 +291,9 @@ static struct { #define RECOVERY_REQUEST_SENSE 2 #define recovery_slot spriv_field1 +static int force_ahci = 1; +TUNABLE_INT("hw.ahci.force", &force_ahci); + static int ahci_probe(device_t dev) { @@ -308,7 +311,8 @@ ahci_probe(device_t dev) for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && ahci_ids[i].rev <= revid && - (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + (valid || (force_ahci == 1 && + !(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) |