aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-08-22 22:17:54 -0400
committerTejun Heo <tj@kernel.org>2013-08-23 12:09:23 -0400
commitf1bc1e4c44b1b78fe34431936c60759b5aad5e3f (patch)
tree8412ab2e71faa0e8d55be7a4565090af6669d4fa /drivers/ata/libata-core.c
parent2b79c56fb41d3956f672990fe83e342a809c89ab (diff)
ata: acpi: rework the ata acpi bind support
Binding ACPI handle to SCSI device has several drawbacks, namely: 1 During ATA device initialization time, ACPI handle will be needed while SCSI devices are not created yet. So each time ACPI handle is needed, instead of retrieving the handle by ACPI_HANDLE macro, a namespace scan is performed to find the handle for the corresponding ATA device. This is inefficient, and also expose a restriction on calling path not holding any lock. 2 The binding to SCSI device tree makes code complex, while at the same time doesn't bring us any benefit. All ACPI handlings are still done in ATA module, not in SCSI. Rework the ATA ACPI binding code to bind ACPI handle to ATA transport devices(ATA port and ATA device). The binding needs to be done only once, since the ATA transport devices do not go away with hotplug. And due to this, the flush_work call in hotplug handler for ATA bay is no longer needed. Tested on an Intel test platform for binding and runtime power off for ODD(ZPODD) and hard disk; on an ASUS S400C for binding and normal boot and S3, where its SATA port node has _SDD and _GTF control methods when configured as an AHCI controller and its PATA device node has _GTF control method when configured as an IDE controller. SATA PMP binding and ATA hotplug is not tested. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Tested-by: Dirk Griesbach <spamthis@freenet.de> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c24354d44f3d..39e78e4524a3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6150,8 +6150,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
6150 if (rc) 6150 if (rc)
6151 goto err_tadd; 6151 goto err_tadd;
6152 6152
6153 ata_acpi_hotplug_init(host);
6154
6155 /* set cable, sata_spd_limit and report */ 6153 /* set cable, sata_spd_limit and report */
6156 for (i = 0; i < host->n_ports; i++) { 6154 for (i = 0; i < host->n_ports; i++) {
6157 struct ata_port *ap = host->ports[i]; 6155 struct ata_port *ap = host->ports[i];
@@ -6632,8 +6630,6 @@ static int __init ata_init(void)
6632 6630
6633 ata_parse_force_param(); 6631 ata_parse_force_param();
6634 6632
6635 ata_acpi_register();
6636
6637 rc = ata_sff_init(); 6633 rc = ata_sff_init();
6638 if (rc) { 6634 if (rc) {
6639 kfree(ata_force_tbl); 6635 kfree(ata_force_tbl);
@@ -6660,7 +6656,6 @@ static void __exit ata_exit(void)
6660 ata_release_transport(ata_scsi_transport_template); 6656 ata_release_transport(ata_scsi_transport_template);
6661 libata_transport_exit(); 6657 libata_transport_exit();
6662 ata_sff_exit(); 6658 ata_sff_exit();
6663 ata_acpi_unregister();
6664 kfree(ata_force_tbl); 6659 kfree(ata_force_tbl);
6665} 6660}
6666 6661