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 /*      $NetBSD: ataio.h,v 1.7 2005/12/11 12:25:20 christos 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 /*
   39  * ATA bus IOCTL
   40  */
   41 /* Scan bus for new devices. */
   42 struct atabusioscan_args {
   43         int     at_dev;         /* device to scan, -1 for wildcard */
   44 };
   45 #define ATABUSIOSCAN    _IOW('A', 50, struct atabusioscan_args)
   46 
   47 #define ATABUSIORESET   _IO('A', 51) /* reset ATA bus */
   48 
   49 struct atabusiodetach_args {
   50         int     at_dev;         /* device to detach; -1 for wildcard */
   51 };
   52 #define ATABUSIODETACH  _IOW('A', 52, struct atabusiodetach_args)
   53 
   54 
   55 #endif /* _SYS_ATAIO_H_ */

Cache object: 1b1399a61c333963be561f1abfbda581


[ 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.