aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-05-14 14:28:16 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-09 12:17:31 -0400
commitfafbae87db88a73b166d3bc3294d209207f27056 (patch)
tree158217a52a396b2be110688f23eacbe25cf1c2d7 /include
parent7dcca30a32aadb0520417521b0c44f42d09fe05c (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 620da7be07b7..d758168ee45d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -363,6 +363,9 @@ struct ata_host {
363 void *private_data; 363 void *private_data;
364 const struct ata_port_operations *ops; 364 const struct ata_port_operations *ops;
365 unsigned long flags; 365 unsigned long flags;
366#ifdef CONFIG_ATA_ACPI
367 acpi_handle acpi_handle;
368#endif
366 struct ata_port *simplex_claimed; /* channel owning the DMA */ 369 struct ata_port *simplex_claimed; /* channel owning the DMA */
367 struct ata_port *ports[0]; 370 struct ata_port *ports[0];
368}; 371};
@@ -429,6 +432,9 @@ struct ata_device {
429 unsigned int devno; /* 0 or 1 */ 432 unsigned int devno; /* 0 or 1 */
430 unsigned long flags; /* ATA_DFLAG_xxx */ 433 unsigned long flags; /* ATA_DFLAG_xxx */
431 struct scsi_device *sdev; /* attached SCSI device */ 434 struct scsi_device *sdev; /* attached SCSI device */
435#ifdef CONFIG_ATA_ACPI
436 acpi_handle acpi_handle;
437#endif
432 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ 438 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
433 u64 n_sectors; /* size of device, if ATA */ 439 u64 n_sectors; /* size of device, if ATA */
434 unsigned int class; /* ATA_DEV_xxx */ 440 unsigned int class; /* ATA_DEV_xxx */
@@ -457,10 +463,6 @@ struct ata_device {
457 struct ata_ering ering; 463 struct ata_ering ering;
458 int spdn_cnt; 464 int spdn_cnt;
459 unsigned int horkage; /* List of broken features */ 465 unsigned int horkage; /* List of broken features */
460#ifdef CONFIG_ATA_ACPI
461 /* ACPI objects info */
462 acpi_handle obj_handle;
463#endif
464}; 466};
465 467
466/* Offset into struct ata_device. Fields above it are maintained 468/* Offset into struct ata_device. Fields above it are maintained
@@ -549,6 +551,9 @@ struct ata_port {
549 551
550 void *private_data; 552 void *private_data;
551 553
554#ifdef CONFIG_ATA_ACPI
555 acpi_handle acpi_handle;
556#endif
552 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ 557 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
553}; 558};
554 559