From e9c417a67303dcd3bad603e253ed1abf32749af1 Mon Sep 17 00:00:00 2001 From: kenh Date: Thu, 19 Nov 1998 19:44:34 +0000 Subject: [PATCH] Definitions used by the WDCIOCCOMMAND ioctl. Mostly inspired by the SCIOCCOMMAND ioctl. --- sys/sys/wdcio.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sys/sys/wdcio.h diff --git a/sys/sys/wdcio.h b/sys/sys/wdcio.h new file mode 100644 index 000000000000..3de6f496e8c2 --- /dev/null +++ b/sys/sys/wdcio.h @@ -0,0 +1,37 @@ +/* $NetBSD: wdcio.h,v 1.1 1998/11/19 19:44:34 kenh Exp $ */ + +#ifndef _SYS_WDCIO_H_ +#define _SYS_WDCIO_H_ + +#include +#include + +typedef struct wdcreq { + u_long flags; /* info about the request status and type */ + u_char command; /* command code */ + u_char features; /* feature modifier bits for command */ + u_char sec_count; /* sector count */ + u_char sec_num; /* sector number */ + u_char head; /* head number */ + u_short cylinder; /* cylinder/lba address */ + + caddr_t databuf; /* Pointer to I/O data buffer */ + u_long datalen; /* length of data buffer */ + int timeout; /* Command timeout */ + u_char retsts; /* the return status for the command */ + u_char error; /* error bits */ +} wdcreq_t; + +/* bit defintions for flags */ +#define WDCCMD_READ 0x00000001 +#define WDCCMD_WRITE 0x00000002 + +/* definitions for the return status (retsts) */ +#define WDCCMD_OK 0x00 +#define WDCCMD_TIMEOUT 0x01 +#define WDCCMD_ERROR 0x02 +#define WDCCMD_DF 0x03 + +#define WDCIOCCOMMAND _IOWR('Q', 8, wdcreq_t) + +#endif /* _SYS_WDCIO_H_ */