aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-04-26 21:37:53 -0400
committerJeff Garzik <jgarzik@redhat.com>2013-04-30 18:02:53 -0400
commit19ccee765f8030c1e36720b6bcb7e8bd8262af5c (patch)
treef4f463487ae979e04eb5e937a91880ae70f9ad2f /drivers/ata
parentd66af4df0837f21bf267305dc5ccab2d29e24d86 (diff)
ACPI/libata: Restore libata.noacpi support
This patch restores libata.noacpi support to libata-acpi.c. There are broken optional control methods for ATA controller devices in the real world. The libata.noacpi has been used for a long time as a workaround to deal with issues caused by the broken ASL codes. 1. The "noacpi" option is introduced by the following commit: commit 11ef697b37e3c85ce1ac21f7711babf1f5b12784 Date: Thu, 28 Sep 2006 11:29:01 -0700 Subject: libata: ACPI and _GTF support 2. The "noacpi" option is renamed to "libata_noacpi" by the following commit: commit d7d0dad62a641c156386288a747c1a2f6bb2e42d Date: Wed, 28 Mar 2007 01:57:37 -0400 Subject: [libata] Disable ACPI by default; fix namespace problems 3. Some of its logics are changed over time - becomes relying on the "acpi_handle" bound to the ATA devices since this commit: commit fafbae87db88a73b166d3bc3294d209207f27056 Date: Tue, 15 May 2007 03:28:16 +0900 Subject: libata-acpi: implement ata_acpi_associate() 4. The option is deleted by the following commit: commit 30dcf76acc695cbd2fa919e294670fe9552e16e7 Date: Mon, 25 Jun 2012 16:13:04 +0800 Subject: libata: migrate ACPI code over to new bindings But the libata.noacpi setup is still left in the kernel without codes to implement it. So the deletion introduces a regression to the Linux. This patch disables ATA_ACPI support at runtime by stopping acpi binding on the ATA devices to fix this regression. This patch is tested by booting a SATA x86-64 kernel or a PATA x86 kernel with or without "libata.noacpi=1" kernel command line argument. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index f6d80e342310..87f2f395d79a 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -77,7 +77,7 @@ acpi_handle ata_dev_acpi_handle(struct ata_device *dev)
77 acpi_integer adr; 77 acpi_integer adr;
78 struct ata_port *ap = dev->link->ap; 78 struct ata_port *ap = dev->link->ap;
79 79
80 if (dev->flags & ATA_DFLAG_ACPI_DISABLED) 80 if (libata_noacpi || dev->flags & ATA_DFLAG_ACPI_DISABLED)
81 return NULL; 81 return NULL;
82 82
83 if (ap->flags & ATA_FLAG_ACPI_SATA) { 83 if (ap->flags & ATA_FLAG_ACPI_SATA) {
@@ -1047,7 +1047,7 @@ static int compat_pci_ata(struct ata_port *ap)
1047 1047
1048static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle) 1048static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle)
1049{ 1049{
1050 if (ap->flags & ATA_FLAG_ACPI_SATA) 1050 if (libata_noacpi || ap->flags & ATA_FLAG_ACPI_SATA)
1051 return -ENODEV; 1051 return -ENODEV;
1052 1052
1053 *handle = acpi_get_child(DEVICE_ACPI_HANDLE(ap->tdev.parent), 1053 *handle = acpi_get_child(DEVICE_ACPI_HANDLE(ap->tdev.parent),