pre-2.3.4..
[davej-history.git] / include / linux / hdsmart.h
blob10bd7249d8e0fae533cc6c3f91a09bf2941a730b
1 #ifndef _LINUX_HDSMART_H
2 #define _LINUX_HDSMART_H
4 /*
5 * This file contains some defines for the AT-hd-controller.
6 * Various sources.
7 */
9 #define NR_ATTRIBUTES 30
11 typedef struct threshold_s {
12 unsigned char id;
13 unsigned char threshold;
14 unsigned char reserved[10];
15 } __attribute__ ((packed)) threshold_t;
17 typedef struct thresholds_s {
18 unsigned short revision;
19 threshold_t thresholds[NR_ATTRIBUTES];
20 unsigned char reserved[18];
21 unsigned char vendor[131];
22 unsigned char checksum;
23 } __attribute__ ((packed)) thresholds_t;
25 typedef struct value_s {
26 unsigned char id;
27 unsigned short status;
28 unsigned char value;
29 unsigned char vendor[8];
30 } __attribute__ ((packed)) value_t;
32 typedef struct values_s {
33 unsigned short revision;
34 value_t values[NR_ATTRIBUTES];
35 unsigned char offline_status;
36 unsigned char vendor1;
37 unsigned short offline_timeout;
38 unsigned char vendor2;
39 unsigned char offline_capability;
40 unsigned short smart_capability;
41 unsigned char reserved[16];
42 unsigned char vendor[125];
43 unsigned char checksum;
44 } __attribute__ ((packed)) values_t;
46 #if !defined(__KERNEL__) || defined(_IDE_DISK_C)
48 #define NR_OFFLINE_TEXTS 5
49 struct {
50 unsigned char value;
51 char *text;
52 } offline_status_text[NR_OFFLINE_TEXTS] = {
53 { 0x00, "NeverStarted" },
54 { 0x02, "Completed" },
55 { 0x04, "Suspended" },
56 { 0x05, "Aborted" },
57 { 0x06, "Failed" }
59 #endif /* !defined(__KERNEL__) || defined(_IDE_DISK_C) */
61 #endif /* _LINUX_HDSMART_H */