aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3784af395576..ba84d8a37545 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -211,7 +211,7 @@ enum {
211 211
212 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ 212 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
213 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ 213 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
214 ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ 214 ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */
215 215
216 /* struct ata_queued_cmd flags */ 216 /* struct ata_queued_cmd flags */
217 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ 217 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
@@ -653,7 +653,7 @@ struct ata_port {
653 653
654#ifdef CONFIG_ATA_ACPI 654#ifdef CONFIG_ATA_ACPI
655 acpi_handle acpi_handle; 655 acpi_handle acpi_handle;
656 struct ata_acpi_gtm acpi_gtm; 656 struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
657#endif 657#endif
658 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ 658 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
659}; 659};
@@ -939,10 +939,20 @@ enum {
939 939
940/* libata-acpi.c */ 940/* libata-acpi.c */
941#ifdef CONFIG_ATA_ACPI 941#ifdef CONFIG_ATA_ACPI
942static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap)
943{
944 if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID)
945 return &ap->__acpi_init_gtm;
946 return NULL;
947}
942extern int ata_acpi_cbl_80wire(struct ata_port *ap); 948extern int ata_acpi_cbl_80wire(struct ata_port *ap);
943int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); 949int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm);
944int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); 950int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm);
945#else 951#else
952static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap)
953{
954 return NULL;
955}
946static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } 956static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; }
947#endif 957#endif
948 958