Home | History | Annotate | Line # | Download | only in scsipi
scsipi_disk.h revision 1.2.2.2
      1  1.2.2.2  thorpej /*	$NetBSD: scsipi_disk.h,v 1.2.2.2 1997/08/27 23:33:27 thorpej Exp $	*/
      2  1.2.2.2  thorpej 
      3  1.2.2.2  thorpej /*
      4  1.2.2.2  thorpej  * SCSI and SCSI-like interfaces description
      5  1.2.2.2  thorpej  */
      6  1.2.2.2  thorpej 
      7  1.2.2.2  thorpej /*
      8  1.2.2.2  thorpej  * Some lines of this file come from a file of the name "scsi.h"
      9  1.2.2.2  thorpej  * distributed by OSF as part of mach2.5,
     10  1.2.2.2  thorpej  *  so the following disclaimer has been kept.
     11  1.2.2.2  thorpej  *
     12  1.2.2.2  thorpej  * Copyright 1990 by Open Software Foundation,
     13  1.2.2.2  thorpej  * Grenoble, FRANCE
     14  1.2.2.2  thorpej  *
     15  1.2.2.2  thorpej  * 		All Rights Reserved
     16  1.2.2.2  thorpej  *
     17  1.2.2.2  thorpej  *   Permission to use, copy, modify, and distribute this software and
     18  1.2.2.2  thorpej  * its documentation for any purpose and without fee is hereby granted,
     19  1.2.2.2  thorpej  * provided that the above copyright notice appears in all copies and
     20  1.2.2.2  thorpej  * that both the copyright notice and this permission notice appear in
     21  1.2.2.2  thorpej  * supporting documentation, and that the name of OSF or Open Software
     22  1.2.2.2  thorpej  * Foundation not be used in advertising or publicity pertaining to
     23  1.2.2.2  thorpej  * distribution of the software without specific, written prior
     24  1.2.2.2  thorpej  * permission.
     25  1.2.2.2  thorpej  *
     26  1.2.2.2  thorpej  *   OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
     27  1.2.2.2  thorpej  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
     28  1.2.2.2  thorpej  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
     29  1.2.2.2  thorpej  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     30  1.2.2.2  thorpej  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
     31  1.2.2.2  thorpej  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
     32  1.2.2.2  thorpej  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     33  1.2.2.2  thorpej  */
     34  1.2.2.2  thorpej 
     35  1.2.2.2  thorpej /*
     36  1.2.2.2  thorpej  * Largely written by Julian Elischer (julian (at) tfs.com)
     37  1.2.2.2  thorpej  * for TRW Financial Systems.
     38  1.2.2.2  thorpej  *
     39  1.2.2.2  thorpej  * TRW Financial Systems, in accordance with their agreement with Carnegie
     40  1.2.2.2  thorpej  * Mellon University, makes this software available to CMU to distribute
     41  1.2.2.2  thorpej  * or use in any manner that they see fit as long as this message is kept with
     42  1.2.2.2  thorpej  * the software. For this reason TFS also grants any other persons or
     43  1.2.2.2  thorpej  * organisations permission to use or modify this software.
     44  1.2.2.2  thorpej  *
     45  1.2.2.2  thorpej  * TFS supplies this software to be publicly redistributed
     46  1.2.2.2  thorpej  * on the understanding that TFS is not responsible for the correct
     47  1.2.2.2  thorpej  * functioning of this software in any circumstances.
     48  1.2.2.2  thorpej  *
     49  1.2.2.2  thorpej  * Ported to run under 386BSD by Julian Elischer (julian (at) tfs.com) Sept 1992
     50  1.2.2.2  thorpej  */
     51  1.2.2.2  thorpej 
     52  1.2.2.2  thorpej /*
     53  1.2.2.2  thorpej  * SCSI command format
     54  1.2.2.2  thorpej  */
     55  1.2.2.2  thorpej 
     56  1.2.2.2  thorpej #ifndef	_SCSI_PI_DISK_H
     57  1.2.2.2  thorpej #define _SCSI_PI_DISK_H 1
     58  1.2.2.2  thorpej 
     59  1.2.2.2  thorpej #define	READ_BIG		0x28
     60  1.2.2.2  thorpej #define WRITE_BIG		0x2a
     61  1.2.2.2  thorpej struct scsipi_rw_big {
     62  1.2.2.2  thorpej 	u_int8_t opcode;
     63  1.2.2.2  thorpej 	u_int8_t byte2;
     64  1.2.2.2  thorpej #define	SRWB_RELADDR	0x01
     65  1.2.2.2  thorpej 	u_int8_t addr[4];
     66  1.2.2.2  thorpej 	u_int8_t reserved;
     67  1.2.2.2  thorpej 	u_int8_t length[2];
     68  1.2.2.2  thorpej 	u_int8_t control;
     69  1.2.2.2  thorpej };
     70  1.2.2.2  thorpej 
     71  1.2.2.2  thorpej #define	READ_CAPACITY		0x25
     72  1.2.2.2  thorpej struct scsipi_read_capacity {
     73  1.2.2.2  thorpej 	u_int8_t opcode;
     74  1.2.2.2  thorpej 	u_int8_t byte2;
     75  1.2.2.2  thorpej 	u_int8_t addr[4];
     76  1.2.2.2  thorpej 	u_int8_t unused[3];
     77  1.2.2.2  thorpej 	u_int8_t control;
     78  1.2.2.2  thorpej };
     79  1.2.2.2  thorpej 
     80  1.2.2.2  thorpej #define START_STOP		0x1b
     81  1.2.2.2  thorpej struct scsipi_start_stop {
     82  1.2.2.2  thorpej 	u_int8_t opcode;
     83  1.2.2.2  thorpej 	u_int8_t byte2;
     84  1.2.2.2  thorpej 	u_int8_t unused[2];
     85  1.2.2.2  thorpej 	u_int8_t how;
     86  1.2.2.2  thorpej #define	SSS_STOP		0x00
     87  1.2.2.2  thorpej #define	SSS_START		0x01
     88  1.2.2.2  thorpej #define	SSS_LOEJ		0x02
     89  1.2.2.2  thorpej 	u_int8_t control;
     90  1.2.2.2  thorpej };
     91  1.2.2.2  thorpej 
     92  1.2.2.2  thorpej 
     93  1.2.2.2  thorpej /* DATAs definitions for the above commands */
     94  1.2.2.2  thorpej 
     95  1.2.2.2  thorpej struct scsipi_read_cap_data {
     96  1.2.2.2  thorpej 	u_int8_t addr[4];
     97  1.2.2.2  thorpej 	u_int8_t length[4];
     98  1.2.2.2  thorpej };
     99  1.2.2.2  thorpej 
    100  1.2.2.2  thorpej #endif /* _SCSI_PI_DISK_H */
    101