blob: d7f6de7b0dc2f4946588a93774fb78918ed3abab [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_HDSMART_H
20#define _LINUX_HDSMART_H
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#define OFFLINE_FULL_SCAN 0
22#define SHORT_SELF_TEST 1
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#define EXTEND_SELF_TEST 2
25#define SHORT_CAPTIVE_SELF_TEST 129
26#define EXTEND_CAPTIVE_SELF_TEST 130
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080027typedef struct ata_smart_attribute_s {
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029 unsigned char id;
30 unsigned short status_flag;
31 unsigned char normalized;
32 unsigned char worse_normal;
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034 unsigned char raw[6];
35 unsigned char reserv;
36} __attribute__ ((packed)) ata_smart_attribute_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080037typedef struct ata_smart_values_s {
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039 unsigned short revnumber;
40 ata_smart_attribute_t vendor_attributes [30];
41 unsigned char offline_data_collection_status;
42 unsigned char self_test_exec_status;
Ben Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044 unsigned short total_time_to_complete_off_line;
45 unsigned char vendor_specific_366;
46 unsigned char offline_data_collection_capability;
47 unsigned short smart_capability;
Ben Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049 unsigned char errorlog_capability;
50 unsigned char vendor_specific_371;
51 unsigned char short_test_completion_time;
52 unsigned char extend_test_completion_time;
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054 unsigned char reserved_374_385 [12];
55 unsigned char vendor_specific_386_509 [125];
56 unsigned char chksum;
57} __attribute__ ((packed)) ata_smart_values_t;
Ben Cheng654325d2012-03-07 21:13:49 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080059typedef struct ata_smart_threshold_entry_s {
60 unsigned char id;
61 unsigned char normalized_threshold;
62 unsigned char reserved[10];
Ben Cheng654325d2012-03-07 21:13:49 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080064} __attribute__ ((packed)) ata_smart_threshold_entry_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080065typedef struct ata_smart_thresholds_s {
66 unsigned short revnumber;
67 ata_smart_threshold_entry_t thres_entries[30];
Ben Cheng654325d2012-03-07 21:13:49 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080069 unsigned char reserved[149];
70 unsigned char chksum;
71} __attribute__ ((packed)) ata_smart_thresholds_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080072typedef struct ata_smart_errorlog_command_struct_s {
Ben Cheng654325d2012-03-07 21:13:49 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080074 unsigned char devicecontrolreg;
75 unsigned char featuresreg;
76 unsigned char sector_count;
77 unsigned char sector_number;
Ben Cheng654325d2012-03-07 21:13:49 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080079 unsigned char cylinder_low;
80 unsigned char cylinder_high;
81 unsigned char drive_head;
82 unsigned char commandreg;
Ben Cheng654325d2012-03-07 21:13:49 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080084 unsigned int timestamp;
85} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080086typedef struct ata_smart_errorlog_error_struct_s {
87 unsigned char error_condition;
Ben Cheng654325d2012-03-07 21:13:49 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080089 unsigned char extended_error[14];
90 unsigned char state;
91 unsigned short timestamp;
92} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
Ben Cheng654325d2012-03-07 21:13:49 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080094typedef struct ata_smart_errorlog_struct_s {
95 ata_smart_errorlog_command_struct_t commands[6];
96 ata_smart_errorlog_error_struct_t error_struct;
97} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
Ben Cheng654325d2012-03-07 21:13:49 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080099typedef struct ata_smart_errorlog_s {
100 unsigned char revnumber;
101 unsigned char error_log_pointer;
102 ata_smart_errorlog_struct_t errorlog_struct[5];
Ben Cheng654325d2012-03-07 21:13:49 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800104 unsigned short ata_error_count;
105 unsigned short non_fatal_count;
106 unsigned short drive_timeout_count;
107 unsigned char reserved[53];
Ben Cheng654325d2012-03-07 21:13:49 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800109 unsigned char chksum;
110} __attribute__ ((packed)) ata_smart_errorlog_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800111typedef struct ata_smart_selftestlog_struct_s {
112 unsigned char selftestnumber;
Ben Cheng654325d2012-03-07 21:13:49 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800114 unsigned char selfteststatus;
115 unsigned short timestamp;
116 unsigned char selftestfailurecheckpoint;
117 unsigned int lbafirstfailure;
Ben Cheng654325d2012-03-07 21:13:49 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800119 unsigned char vendorspecific[15];
120} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800121typedef struct ata_smart_selftestlog_s {
122 unsigned short revnumber;
Ben Cheng654325d2012-03-07 21:13:49 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800124 ata_smart_selftestlog_struct_t selftest_struct[21];
125 unsigned char vendorspecific[2];
126 unsigned char mostrecenttest;
127 unsigned char resevered[2];
Ben Cheng654325d2012-03-07 21:13:49 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800129 unsigned char chksum;
130} __attribute__ ((packed)) ata_smart_selftestlog_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800131#endif