/* $NetBSD: if_qtreg.h,v 1.6 2021/12/20 17:12:41 rhialto Exp $ */
/*
* Copyright (c) 1992 Steven M. Schultz
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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_qtreg.h 1.0 (GTE) 10/12/92
*/
/*
* Modification History
* 26 Feb 93 -- sms
* Add defines for number of receive and transmit ring descriptors.
*
* 12 Oct 92 -- Steven M. Schultz (sms)
* Created from the DELQA-PLUS Addendum to the DELQA User's Guide.
*/
#define QT_MAX_RCV 32
#define QT_MAX_XMT 12
/* Receive ring descriptor and bit/field definitions */
struct qt_rring
{
short rmd0;
short rmd1;
short rmd2;
short rmd3;
short rmd4;
short rmd5;
#ifdef pdp11
struct qt_uba *rhost0;
short rhost1;
#else
short pad1, pad2;
#endif
};
/* Transmit ring descriptor and bit/field definitions */
struct qt_tring
{
short tmd0;
short tmd1;
short tmd2;
short tmd3;
short tmd4;
short tmd5;
#ifdef pdp11
struct qt_uba *thost0;
short thost1;
#else
short pad1, pad2;
#endif
};
#define TMD0_ERR1 0x4000 /* Error summary. LCO|LCA|RTR */
#define TMD0_MOR 0x1000 /* More than one retry on transmit */
#define TMD0_ONE 0x0800 /* One retry on transmit */
#define TMD0_DEF 0x0400 /* Deferral during transmit */
#define TMD1_LCO 0x1000 /* Late collision on transmit */
#define TMD1_LCA 0x0800 /* Loss of carrier on transmit */
#define TMD1_RTR 0x0400 /* Retry error on transmit */
#define TMD1_TDR 0x03ff /* Time Domain Reflectometry value */
#define TMD2_ERR2 0x8000 /* Error summary. BBL|CER|MIS */
#define TMD2_BBL 0x4000 /* Babble error on transmit */
#define TMD2_CER 0x2000 /* Collision error on transmit */
#define TMD2_MIS 0x1000 /* Packet lost on receive */
#define TMD2_EOR 0x0800 /* Endof Receive ring reached */
#define TMD2_RON 0x0020 /* Receiver on */
#define TMD2_TON 0x0010 /* Transmitter on */
#define TMD3_OWN 0x8000 /* Ownership field */
#define TMD3_FOT 0x4000 /* First of two flag */
#define TMD3_BCT 0x0fff /* Byte count */