Annotation of 43BSDReno/sys/tahoevba/psproto.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1986 The Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution is only permitted until one year after the first shipment
                      6:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
                      7:  * binary forms are permitted provided that: (1) source distributions retain
                      8:  * this entire copyright notice and comment, and (2) distributions including
                      9:  * binaries display the following acknowledgement:  This product includes
                     10:  * software developed by the University of California, Berkeley and its
                     11:  * contributors'' in the documentation or other materials provided with the
                     12:  * distribution and in all advertising materials mentioning features or use
                     13:  * of this software.  Neither the name of the University nor the names of
                     14:  * its contributors may be used to endorse or promote products derived from
                     15:  * this software without specific prior written permission.
                     16:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     17:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     18:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     19:  *
                     20:  *     @(#)psproto.h   7.3 (Berkeley) 6/28/90
                     21:  */
                     22: 
                     23: /*
                     24:  * PS300-Host Handshake Protocol Definitions.
                     25:  */
                     26: 
                     27: /*
                     28:  * Commands sent from host->PS300.
                     29:  *
                     30:  * In the initial handshake carried out when requesting
                     31:  * one of these commands be performed, the PS300 always
                     32:  * returns the identical code to indicate success.
                     33:  */
                     34: #define PS_ABORT        0x1000  /* abort current command */
                     35: #define PS_RESET        0x3000  /* reset device */
                     36: #define PS_RDNET        0x5000  /* logical read */
                     37: #define PS_LOOKUP       0x8000  /* name lookup */
                     38: #define PS_RDPHY        0x9000  /* physical read */
                     39: #define PS_WRPHY_SYNC   0xa000  /* physical write w/ sync */
                     40: #define PS_WRPHY        0xb000  /* physical write */
                     41: #define PS_WRNET        0xc000  /* logical write */
                     42: #define PS_DETACH       0xd000  /* normal/diagnostic detach */
                     43: #define PS_ATTACH       0xe000  /* normal attach */
                     44: #define PS_DATTACH      0xf000  /* diagnostic attach */
                     45: 
                     46: #define PS_DIOREAD      0x4000  /* internal, wait for dioread attention */
                     47: 
                     48: /*
                     49:  * Command responses from PS300->host.
                     50:  */
                     51: #define PS_DMAOK(code)  ((code)|0x0a00) /* successful dma transfer */ 
                     52: #define PS_ADROK(code)  ((code)|0x0100) /* successful address tranfer */
                     53: 
                     54: #define PS_CODE(v)      ((v)&0xf000)    /* extract code from PS300 msg */
                     55: #define PS_LUNIT(v)     ((v)&0x000f)    /* extract PS300 unit from msg */
                     56: 
                     57: /*
                     58:  * Single unit PS300 address list.
                     59:  */
                     60: struct  psalist {
                     61:         u_short nblocks;                /* # of i/o vectors (we always use 1) */
                     62:         u_short addr[2];                /* PS300 address */
                     63:         u_short wc;                     /* transfer size */
                     64: };
                     65: 
                     66: /*
                     67:  * The max dma size is actually 64KB, but
                     68:  * we limit it to be just large enough for
                     69:  * the maximum vector list as this is sufficient
                     70:  * for our needs and we must allocate real
                     71:  * memory to the intermediate buffer.
                     72:  */
                     73: #define PS_MAXDMA       (1024+2048*12)
                     74: 
                     75: /*
                     76:  * Pseudo commands used internally by the driver.
                     77:  */
                     78: #define PS_DMAOUT       0x0100          /* dma buffer host->PS300 */
                     79: #define PS_DMAIN        0x0200          /* dma buffer PS300->host */
                     80: 
                     81: /*
                     82:  * Default timeouts.
                     83:  */
                     84: #define PS_TIMEOUT      30              /* dma/attention timeout (in hz) */
                     85: #define PS_DIOTIMO      1000            /* dio polling timeout */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.