[BACK]Return to rsp.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / include

Annotation of sys/arch/vax/include/rsp.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: rsp.h,v 1.2 1997/05/29 00:04:50 niklas Exp $ */
        !             2: /*     $NetBSD: rsp.h,v 1.1 1996/02/17 18:14:50 ragge Exp $ */
        !             3: /*
        !             4:  * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
        !             5:  * All rights reserved.
        !             6:  *
        !             7:  * Redistribution and use in source and binary forms, with or without
        !             8:  * modification, are permitted provided that the following conditions
        !             9:  * are met:
        !            10:  * 1. Redistributions of source code must retain the above copyright
        !            11:  *    notice, this list of conditions and the following disclaimer.
        !            12:  * 2. Redistributions in binary form must reproduce the above copyright
        !            13:  *    notice, this list of conditions and the following disclaimer in the
        !            14:  *    documentation and/or other materials provided with the distribution.
        !            15:  * 3. All advertising materials mentioning features or use of this software
        !            16:  *    must display the following acknowledgement:
        !            17:  *      This product includes software developed at Ludd, University of
        !            18:  *      Lule}, Sweden and its contributors.
        !            19:  * 4. The name of the author may not be used to endorse or promote products
        !            20:  *    derived from this software without specific prior written permission
        !            21:  *
        !            22:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            23:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            24:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            25:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            26:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            27:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            28:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            29:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            30:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            31:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            32:  */
        !            33:
        !            34:
        !            35: /*
        !            36:  * The Radial Serial Protocol (RSP) that TU58 (DECtape II) uses
        !            37:  * is a strange animal that is sent over serial lines.
        !            38:  * Most packet types can match the struct rsp, but some can't (i.e.
        !            39:  * data packets).
        !            40:  * More about RSP can be read in Digital Peripherals Handbook, p. 92.
        !            41:  */
        !            42:
        !            43: struct rsp {
        !            44:        char    rsp_typ;        /* Packet type */
        !            45:        char    rsp_sz;         /* Packet size */
        !            46:        char    rsp_op;         /* Operation */
        !            47:        char    rsp_mod;        /* Modifier */
        !            48:        char    rsp_drv;        /* Tape drive number */
        !            49:        char    rsp_sw;         /* Switches */
        !            50:        char    rsp_xx1;        /* Unused, always zero */
        !            51:        char    rsp_xx2;        /* Unused, always zero */
        !            52:        short   rsp_cnt;        /* Byte count to transfer */
        !            53:        short   rsp_blk;        /* Block number */
        !            54:        short   rsp_sum;        /* Checksum of packet */
        !            55: };
        !            56:
        !            57: /* Types of packets */
        !            58: #define        RSP_TYP_DATA            001     /* DATA packet */
        !            59: #define        RSP_TYP_COMMAND         002     /* COMMAND packet */
        !            60: #define        RSP_TYP_INIT            004     /* INITIALIZE packet */
        !            61: #define        RSP_TYP_BOOT            010     /* BOOTSTRAP packet (PDP11) */
        !            62: #define        RSP_TYP_CONTINUE        020     /* CONTINUE packet */
        !            63: #define        RSP_TYP_XOFF            023     /* XOFF packet */
        !            64:
        !            65: /* Operation types */
        !            66: #define        RSP_OP_NOP              000     /* No operation */
        !            67: #define        RSP_OP_RESET            001     /* Reset */
        !            68: #define        RSP_OP_READ             002     /* Read data */
        !            69: #define        RSP_OP_WRITE            003     /* Write data */
        !            70: #define        RSP_OP_POS              005     /* Position tape */
        !            71: #define        RSP_OP_DIAG             007     /* internal diagnose */
        !            72: #define        RSP_OP_GSTAT            010     /* Get status */
        !            73: #define        RSP_OP_SSTAT            011     /* Set status */
        !            74: #define        RSP_OP_END              100     /* End packet */
        !            75:
        !            76: /* Modifier */
        !            77: #define        RSP_MOD_VERIFY          001     /* Verify read data */
        !            78: #define        RSP_MOD_OK              000     /* Success */
        !            79: #define        RSP_MOD_RETR            001     /* Success w/ retries */
        !            80: #define        RSP_MOD_FAIL            -1      /* Failed self-test */
        !            81: #define        RSP_MOD_PART            -2      /* Partial operation */
        !            82: #define        RSP_MOD_NET             -8      /* Non-existent tape drive */
        !            83: #define        RSP_MOD_NOC             -9      /* No cartridge */
        !            84: #define        RSP_MOD_WP              -11     /* Write protected */
        !            85: #define        RSP_MOD_DERR            -17     /* Data error */
        !            86: #define        RSP_MOD_SERR            -32     /* Seek error */
        !            87: #define        RSP_MOD_STOP            -33     /* Motor stopped */
        !            88: #define        RSP_MOD_INVAL           -48     /* Invalid opcode */
        !            89: #define        RSP_MOD_INVBLK          -55     /* Invalid bloch number */
        !            90:

CVSweb