libata-acpi: implement ata_acpi_associate()

* Add acpi_handle to ata_host and ata_port.  Rename
  ata_device->obj_handle to ->acpi_handle and move it above such that
  it doesn't get cleared on reconfiguration.

* Replace ACPI node association which ata_acpi_associate() which is
  called once during host initialization.  Unlike the previous
  implementation, ata_acpi_associate() uses ATA_FLAG_ACPI_SATA to
  choose between IDE or SATA ACPI hierarchy and uses simple child look
  up instead of recursive walk to match the nodes.  This is way safer
  and simpler.  Please read the following message for more info.

  http://article.gmane.org/gmane.linux.ide/17554

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Tejun Heo
2007-05-15 03:28:16 +09:00
committed by Jeff Garzik
parent 7dcca30a32
commit fafbae87db
4 changed files with 64 additions and 325 deletions

View File

@@ -98,9 +98,11 @@ extern struct ata_port *ata_port_alloc(struct ata_host *host);
/* libata-acpi.c */
#ifdef CONFIG_ATA_ACPI
extern void ata_acpi_associate(struct ata_host *host);
extern int ata_acpi_exec_tfs(struct ata_port *ap);
extern int ata_acpi_push_id(struct ata_device *dev);
#else
static inline void ata_acpi_associate(struct ata_host *host) { }
static inline int ata_acpi_exec_tfs(struct ata_port *ap)
{
return 0;