aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-01-15 04:20:58 -0500
committerJeff Garzik <jgarzik@redhat.com>2013-01-21 15:40:35 -0500
commitafe759511808cd5bb508b598007cf0c7b0ca8e08 (patch)
tree26073c5a74b5fe2183aa457da6d9b5cc3d9912bb /include
parent1757d902b029a29dfcef63609964385cf8865b5a (diff)
libata: identify and init ZPODD devices
The ODD can be enabled for ZPODD if the following three conditions are satisfied: 1 The ODD supports device attention; 2 The platform can runtime power off the ODD through ACPI; 3 The ODD is either slot type or drawer type. For such ODDs, zpodd_init is called and a new structure is allocated for it to store ZPODD related stuffs. And the zpodd_dev_enabled function is used to test if ZPODD is currently enabled for this ODD. A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h3
-rw-r--r--include/uapi/linux/cdrom.h34
2 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 7ae207eb29a0..65ff67e34b77 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -621,6 +621,9 @@ struct ata_device {
621 union acpi_object *gtf_cache; 621 union acpi_object *gtf_cache;
622 unsigned int gtf_filter; 622 unsigned int gtf_filter;
623#endif 623#endif
624#ifdef CONFIG_SATA_ZPODD
625 void *zpodd;
626#endif
624 struct device tdev; 627 struct device tdev;
625 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ 628 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
626 u64 n_sectors; /* size of device, if ATA */ 629 u64 n_sectors; /* size of device, if ATA */
diff --git a/include/uapi/linux/cdrom.h b/include/uapi/linux/cdrom.h
index 898b866b300c..bd17ad5aa06d 100644
--- a/include/uapi/linux/cdrom.h
+++ b/include/uapi/linux/cdrom.h
@@ -908,5 +908,39 @@ struct mode_page_header {
908 __be16 desc_length; 908 __be16 desc_length;
909}; 909};
910 910
911/* removable medium feature descriptor */
912struct rm_feature_desc {
913 __be16 feature_code;
914#if defined(__BIG_ENDIAN_BITFIELD)
915 __u8 reserved1:2;
916 __u8 feature_version:4;
917 __u8 persistent:1;
918 __u8 curr:1;
919#elif defined(__LITTLE_ENDIAN_BITFIELD)
920 __u8 curr:1;
921 __u8 persistent:1;
922 __u8 feature_version:4;
923 __u8 reserved1:2;
924#endif
925 __u8 add_len;
926#if defined(__BIG_ENDIAN_BITFIELD)
927 __u8 mech_type:3;
928 __u8 load:1;
929 __u8 eject:1;
930 __u8 pvnt_jmpr:1;
931 __u8 dbml:1;
932 __u8 lock:1;
933#elif defined(__LITTLE_ENDIAN_BITFIELD)
934 __u8 lock:1;
935 __u8 dbml:1;
936 __u8 pvnt_jmpr:1;
937 __u8 eject:1;
938 __u8 load:1;
939 __u8 mech_type:3;
940#endif
941 __u8 reserved2;
942 __u8 reserved3;
943 __u8 reserved4;
944};
911 945
912#endif /* _UAPI_LINUX_CDROM_H */ 946#endif /* _UAPI_LINUX_CDROM_H */