/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)if_dereg.h 7.3 (Berkeley) 6/28/90
*/
/*
* DEC DEUNA interface
*/
#ifdef notdef
struct dedevice {
union {
short p0_w;
char p0_b[2];
} u_p0;
#define pcsr0 u_p0.p0_w
#define pclow u_p0.p0_b[0]
#define pchigh u_p0.p0_b[1]
short pcsr1;
short pcsr2;
short pcsr3;
};
#endif
/*
* Port Control Block Base
*/
struct de_pcbb {
int16_t pcbb0; /* function */
int16_t pcbb2; /* command specific */
int16_t pcbb4;
int16_t pcbb6;
};
/* PCBB function codes */
#define FC_NOOP 0x00 /* NO-OP */
#define FC_LSUADDR 0x01 /* Load and start microaddress */
#define FC_RDDEFAULT 0x02 /* Read default physical address */
#define FC_RDPHYAD 0x04 /* Read physical address */
#define FC_WTPHYAD 0x05 /* Write physical address */
#define FC_RDMULTI 0x06 /* Read multicast address list */
#define FC_WTMULTI 0x07 /* Read multicast address list */
#define FC_RDRING 0x08 /* Read ring format */
#define FC_WTRING 0x09 /* Write ring format */
#define FC_RDCNTS 0x0a /* Read counters */
#define FC_RCCNTS 0x0b /* Read and clear counters */
#define FC_RDMODE 0x0c /* Read mode */
#define FC_WTMODE 0x0d /* Write mode */
#define FC_RDSTATUS 0x0e /* Read port status */
#define FC_RCSTATUS 0x0f /* Read and clear port status */
#define FC_DUMPMEM 0x10 /* Dump internal memory */
#define FC_LOADMEM 0x11 /* Load internal memory */
#define FC_RDSYSID 0x12 /* Read system ID parameters */
#define FC_WTSYSID 0x13 /* Write system ID parameters */
#define FC_RDSERAD 0x14 /* Read load server address */
#define FC_WTSERAD 0x15 /* Write load server address */
/*
* Unibus Data Block Base (UDBB) for ring buffers
*/
struct de_udbbuf {
int16_t b_tdrbl; /* Transmit desc ring base low 16 bits */
int8_t b_tdrbh; /* Transmit desc ring base high 2 bits */
int8_t b_telen; /* Length of each transmit entry */
int16_t b_trlen; /* Number of entries in the XMIT desc ring */
int16_t b_rdrbl; /* Receive desc ring base low 16 bits */
int8_t b_rdrbh; /* Receive desc ring base high 2 bits */
int8_t b_relen; /* Length of each receive entry */
int16_t b_rrlen; /* Number of entries in the RECV desc ring */
};