aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen.c.accardi@intel.com>2008-06-03 13:33:55 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-14 15:59:33 -0400
commit18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee (patch)
tree4f127510c378cba33e79d5fb71bd9fc14a28e1cb /include/linux
parent87fbc5a060faf2394bee88a93519f9b9d434727c (diff)
libata/ahci: enclosure management support
Add Enclosure Management support to libata and ahci. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 035f8e1cd0ac..5b247b8a6b3b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -169,6 +169,7 @@ enum {
169 ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB, 169 ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
170 ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */ 170 ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */
171 ATA_LFLAG_DISABLED = (1 << 6), /* link is disabled */ 171 ATA_LFLAG_DISABLED = (1 << 6), /* link is disabled */
172 ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
172 173
173 /* struct ata_port flags */ 174 /* struct ata_port flags */
174 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ 175 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
@@ -191,6 +192,10 @@ enum {
191 ATA_FLAG_AN = (1 << 18), /* controller supports AN */ 192 ATA_FLAG_AN = (1 << 18), /* controller supports AN */
192 ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ 193 ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */
193 ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */ 194 ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */
195 ATA_FLAG_EM = (1 << 21), /* driver supports enclosure
196 * management */
197 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
198 * led */
194 199
195 /* The following flag belongs to ap->pflags but is kept in 200 /* The following flag belongs to ap->pflags but is kept in
196 * ap->flags because it's referenced in many LLDs and will be 201 * ap->flags because it's referenced in many LLDs and will be
@@ -446,6 +451,15 @@ enum link_pm {
446 MEDIUM_POWER, 451 MEDIUM_POWER,
447}; 452};
448extern struct device_attribute dev_attr_link_power_management_policy; 453extern struct device_attribute dev_attr_link_power_management_policy;
454extern struct device_attribute dev_attr_em_message_type;
455extern struct device_attribute dev_attr_em_message;
456extern struct device_attribute dev_attr_sw_activity;
457
458enum sw_activity {
459 OFF,
460 BLINK_ON,
461 BLINK_OFF,
462};
449 463
450#ifdef CONFIG_ATA_SFF 464#ifdef CONFIG_ATA_SFF
451struct ata_ioports { 465struct ata_ioports {
@@ -701,6 +715,7 @@ struct ata_port {
701 struct timer_list fastdrain_timer; 715 struct timer_list fastdrain_timer;
702 unsigned long fastdrain_cnt; 716 unsigned long fastdrain_cnt;
703 717
718 int em_message_type;
704 void *private_data; 719 void *private_data;
705 720
706#ifdef CONFIG_ATA_ACPI 721#ifdef CONFIG_ATA_ACPI
@@ -792,6 +807,12 @@ struct ata_port_operations {
792 u8 (*bmdma_status)(struct ata_port *ap); 807 u8 (*bmdma_status)(struct ata_port *ap);
793#endif /* CONFIG_ATA_SFF */ 808#endif /* CONFIG_ATA_SFF */
794 809
810 ssize_t (*em_show)(struct ata_port *ap, char *buf);
811 ssize_t (*em_store)(struct ata_port *ap, const char *message,
812 size_t size);
813 ssize_t (*sw_activity_show)(struct ata_device *dev, char *buf);
814 ssize_t (*sw_activity_store)(struct ata_device *dev,
815 enum sw_activity val);
795 /* 816 /*
796 * Obsolete 817 * Obsolete
797 */ 818 */