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/i386ipsc/sd.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  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * Copyright 1988, 1989, 1990, 1991 by Intel Corporation,
   28  * Santa Clara, California.
   29  * 
   30  *                          All Rights Reserved
   31  * 
   32  * Permission to use, copy, modify, and distribute this software and its
   33  * documentation for any purpose and without fee is hereby granted,
   34  * provided that the above copyright notice appears in all copies and that
   35  * both the copyright notice and this permission notice appear in
   36  * supporting documentation, and that the name of Intel not be used in
   37  * advertising or publicity pertaining to distribution of the software
   38  * without specific, written prior permission.
   39  * 
   40  * INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
   41  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
   42  * SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
   43  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
   44  * PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS
   45  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
   46  * THIS SOFTWARE.
   47  */
   48 /*
   49  * HISTORY
   50  * $Log:        sd.h,v $
   51  * Revision 2.4  91/06/18  20:50:35  jsb
   52  *      New copyright from Intel.
   53  *      [91/06/18  20:07:53  jsb]
   54  * 
   55  * Revision 2.3  91/06/06  17:04:57  jsb
   56  *      From Don Cameron: changed NDRIVES from 1 to 4.
   57  *      [91/05/13  17:10:29  jsb]
   58  * 
   59  * Revision 2.2  90/12/04  14:47:45  jsb
   60  *      First checkin.
   61  *      [90/12/04  10:58:27  jsb]
   62  * 
   63  */ 
   64 
   65 #define BOOTRECORDSIGNATURE                     (0x55aa & 0x00ff)
   66 
   67 #define PARTITION(z)    (minor(z) & 0x0f)
   68 #define UNIT(z)         (minor(z) >> 4)
   69 
   70 #define PDLOCATION      29      
   71 
   72 #define NDRIVES 4
   73 #define SECSIZE 512
   74 
   75 #define GETALTTBL       (('H' <<8) | 1)
   76 #define FMTBAD          (('H' <<8) | 2)
   77 #define BAD_BLK         0x80            /* needed for V_VERIFY */
   78 
   79 /*
   80  * Driver states
   81  */
   82 #define NULL_STEP       0
   83 #define MSG_STEP        1
   84 #define STATUS_STEP     2
   85 #define DISC_STEP       3
   86 #define DONE_STEP       4
   87 #define CMD_STEP        5
   88 #define RSEL_STEP       6
   89 
   90 
   91 typedef long paddr_t;
   92 
   93 /*  hh holds the state of the current block I/O request for each drive */
   94 struct hh {
   95         unsigned char   cmd[12];        /* SCSI command bytes */
   96         short   cmd_len;                /* Command length */
   97         char    cmd_busy;               /* Command not yet complete */
   98         char    direction;              /* Data transfer direction, 0 = out */
   99         long    transfer_length;        /* How much data to move */
  100         unsigned char   cmd_st;         /* Command completion status */
  101         unsigned char   cmd_msg;        /* Command completion message byte */
  102         unsigned char   state;          /* Current state (tape) */
  103         unsigned char   step;           /* Current step (tape) */
  104         unsigned char   retry_count;    /* # of times cmd has been tried */
  105         unsigned char   status;         /* stat read from controller port */
  106         struct  buf     buflst;         /* head of list of IO buffers */
  107         short           buf_io;         /* TRUE if using IO buffer */
  108         unsigned char   wait_to_drain;  /* used by format, open, close */
  109         unsigned char   restore_request;/* restore command */
  110         unsigned char   format_request; /* let's do some formatting */
  111         unsigned char   open_close_ioctl_mutex; /* for open/closing/fmt partitions */
  112         daddr_t physblock;              /* block # relative to partition 0 */
  113         paddr_t rw_addr;                /* ram addr to read/write from/to */
  114         unsigned int    cylinder;       /* cylinder # rel. to part. 0 */
  115         unsigned int    head;           /* as it looks */
  116         unsigned int    sector;         /* as it looks */
  117 };

Cache object: f5d30f05b2f5aea08ef2982261969bda


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