1 #ifndef _LINUX_HDSMART_H
2 #define _LINUX_HDSMART_H
5 * This file contains some defines for the AT-hd-controller.
9 #define NR_ATTRIBUTES 30
11 typedef struct threshold_s
{
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
{
27 unsigned short status
;
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
52 } offline_status_text
[NR_OFFLINE_TEXTS
] = {
53 { 0x00, "NeverStarted" },
54 { 0x02, "Completed" },
55 { 0x04, "Suspended" },
59 #endif /* !defined(__KERNEL__) || defined(_IDE_DISK_C) */
61 #endif /* _LINUX_HDSMART_H */