This source file includes following definitions.
- atareq_t
- atagettrace_t
1
2
3
4 #ifndef _SYS_ATAIO_H_
5 #define _SYS_ATAIO_H_
6
7 #include <sys/types.h>
8 #include <sys/ioctl.h>
9
10 typedef struct atareq {
11 u_long flags;
12 u_char command;
13 u_char features;
14 u_char sec_count;
15 u_char sec_num;
16 u_char head;
17 u_short cylinder;
18
19 caddr_t databuf;
20 u_long datalen;
21 int timeout;
22 u_char retsts;
23 u_char error;
24 } atareq_t;
25
26
27 #define ATACMD_READ 0x00000001
28 #define ATACMD_WRITE 0x00000002
29 #define ATACMD_READREG 0x00000004
30
31
32 #define ATACMD_OK 0x00
33 #define ATACMD_TIMEOUT 0x01
34 #define ATACMD_ERROR 0x02
35 #define ATACMD_DF 0x03
36
37 #define ATAIOCCOMMAND _IOWR('Q', 8, atareq_t)
38
39 typedef struct atagettrace {
40 unsigned int buf_size;
41 void *buf;
42 unsigned int bytes_copied;
43 unsigned int bytes_left;
44 } atagettrace_t;
45
46 #define ATAIOGETTRACE _IOWR('Q', 27, struct atagettrace)
47
48 #endif