FreeBSD/Linux Kernel Cross Reference
sys/sys/ataio.h
1 /* $NetBSD: ataio.h,v 1.3 2002/09/29 23:24:00 wiz Exp $ */
2
3 #ifndef _SYS_ATAIO_H_
4 #define _SYS_ATAIO_H_
5
6 #include <sys/types.h>
7 #include <sys/ioctl.h>
8
9 typedef struct atareq {
10 u_long flags; /* info about the request status and type */
11 u_char command; /* command code */
12 u_char features; /* feature modifier bits for command */
13 u_char sec_count; /* sector count */
14 u_char sec_num; /* sector number */
15 u_char head; /* head number */
16 u_short cylinder; /* cylinder/lba address */
17
18 caddr_t databuf; /* Pointer to I/O data buffer */
19 u_long datalen; /* length of data buffer */
20 int timeout; /* Command timeout */
21 u_char retsts; /* the return status for the command */
22 u_char error; /* error bits */
23 } atareq_t;
24
25 /* bit definitions for flags */
26 #define ATACMD_READ 0x00000001
27 #define ATACMD_WRITE 0x00000002
28 #define ATACMD_READREG 0x00000004
29
30 /* definitions for the return status (retsts) */
31 #define ATACMD_OK 0x00
32 #define ATACMD_TIMEOUT 0x01
33 #define ATACMD_ERROR 0x02
34 #define ATACMD_DF 0x03
35
36 #define ATAIOCCOMMAND _IOWR('Q', 8, atareq_t)
37
38 #endif /* _SYS_ATAIO_H_ */
Cache object: 8b005afca1b1b8092f02e9c819addb3d
|