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/dev/ata/atapi-fd.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 /*-
    2  * Copyright (c) 1998 - 2007 Søren Schmidt <sos@FreeBSD.org>
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer,
   10  *    without modification, immediately at the beginning of the file.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   25  *
   26  * $FreeBSD$
   27  */
   28 
   29 /* ATAPI Rewriteable drive Capabilities and Mechanical Status Page */
   30 struct afd_capabilities {
   31     u_int16_t   data_length;
   32     u_int8_t    medium_type;
   33 #define MFD_2DD_UN              0x10
   34 #define MFD_2DD                 0x11
   35 #define MFD_HD_UN               0x20
   36 #define MFD_HD_12_98            0x22
   37 #define MFD_HD_12               0x23
   38 #define MFD_HD_144              0x24
   39 #define MFD_UHD                 0x31
   40 
   41 #define MFD_UNKNOWN             0x00
   42 #define MFD_NO_DISC             0x70
   43 #define MFD_DOOR_OPEN           0x71
   44 #define MFD_FMT_ERROR           0x72
   45 
   46     u_int8_t    reserved0       :7;
   47     u_int8_t    wp              :1;             /* write protect */
   48     u_int8_t    unused[4];
   49 
   50     /* capabilities page */
   51     u_int8_t    page_code       :6;
   52 #define ATAPI_REWRITEABLE_CAP_PAGE        0x05
   53 
   54     u_int8_t    reserved1_6     :1;
   55     u_int8_t    ps              :1;             /* page save supported */
   56     u_int8_t    page_length;                    /* page length */
   57     u_int16_t   transfer_rate;                  /* in kilobits per second */
   58     u_int8_t    heads;                          /* number of heads */
   59     u_int8_t    sectors;                        /* number of sectors pr track */
   60     u_int16_t   sector_size;                    /* number of bytes per sector */
   61     u_int16_t   cylinders;                      /* number of cylinders */
   62     u_int8_t    reserved10[10];
   63     u_int8_t    motor_delay;                    /* motor off delay */
   64     u_int8_t    reserved21[7];
   65     u_int16_t   rpm;                            /* rotations per minute */
   66     u_int8_t    reserved30[2];
   67 };
   68 
   69 struct afd_capacity {
   70     u_int32_t   capacity;
   71     u_int32_t   blocksize;
   72 };
   73 
   74 struct afd_capacity_big {
   75     u_int64_t   capacity;
   76     u_int32_t   blocksize;
   77 };
   78 
   79 struct afd_softc {
   80     u_int64_t   mediasize;
   81     u_int32_t   heads;
   82     u_int32_t   sectors;
   83     u_int32_t   sectorsize;
   84     struct disk *disk;                          /* virtual drives */
   85 };
   86 

Cache object: 4da717e515a89fc571a9fb7914bde7a0


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