#ifndef _SYS_ATAIO_H_
#define _SYS_ATAIO_H_
#include <sys/types.h>
#include <sys/ioctl.h>
typedef struct atareq {
u_long flags;
u_char command;
u_char features;
u_char sec_count;
u_char sec_num;
u_char head;
u_short cylinder;
caddr_t databuf;
u_long datalen;
int timeout;
u_char retsts;
u_char error;
} atareq_t;
#define ATACMD_READ 0x00000001
#define ATACMD_WRITE 0x00000002
#define ATACMD_READREG 0x00000004
#define ATACMD_OK 0x00
#define ATACMD_TIMEOUT 0x01
#define ATACMD_ERROR 0x02
#define ATACMD_DF 0x03
#define ATAIOCCOMMAND _IOWR('Q', 8, atareq_t)
typedef struct atagettrace {
unsigned int buf_size;
void *buf;
unsigned int bytes_copied;
unsigned int bytes_left;
} atagettrace_t;
#define ATAIOGETTRACE _IOWR('Q', 27, struct atagettrace)
#endif