The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/ataio.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $OpenBSD: ataio.h,v 1.5 2003/09/26 21:43:32 miod Exp $  */
    2 /*      $NetBSD: ataio.h,v 1.2 1998/11/23 22:58:23 kenh Exp $   */
    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;          /* info about the request status and type */
   12         u_char  command;        /* command code */
   13         u_char  features;       /* feature modifier bits for command */
   14         u_char  sec_count;      /* sector count */
   15         u_char  sec_num;        /* sector number */
   16         u_char  head;           /* head number */
   17         u_short cylinder;       /* cylinder/lba address */
   18 
   19         caddr_t databuf;        /* pointer to I/O data buffer */
   20         u_long  datalen;        /* length of data buffer */
   21         int     timeout;        /* command timeout */
   22         u_char  retsts;         /* return status for the command */
   23         u_char  error;          /* error bits */
   24 } atareq_t;
   25 
   26 /* bit definitions for flags */
   27 #define ATACMD_READ             0x00000001
   28 #define ATACMD_WRITE            0x00000002
   29 #define ATACMD_READREG          0x00000004
   30 
   31 /* definitions for the return status (retsts) */
   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;       /* length of data buffer */
   41         void            *buf;           /* pointer to data buffer */
   42         unsigned int    bytes_copied;   /* number of bytes copied to buffer */
   43         unsigned int    bytes_left;     /* number of bytes left */
   44 } atagettrace_t;
   45 
   46 #define ATAIOGETTRACE   _IOWR('Q', 27, struct atagettrace)
   47 
   48 #endif /* _SYS_ATAIO_H_ */

Cache object: f528978b86c3ce4fb3f6f14c5a546549


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.