/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Frank van der Linden.
*
* 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
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
*/
#ifndef ELXL_H
#define ELXL_H
/*
* This file defines the registers specific to the EtherLink XL family
* of NICs.
*/
/*
* Defines for the interrupt status register
*/
#define INT_WATCHED \
/*
* Flat address space registers (outside the windows)
*/
/*
* Window 0. Eeprom access.
*/
/*
* Window 2.
*/
/*
* Window 3.
*/
/*
* This is reset options for the other cards, media options for
* the 90xB NICs. Reset options are in a separate register for
* the 90xB.
*
* Note that these bit values are also the same as the
* W3_RESET_OPTIONS media selection bits on 90x NICs, which
* conviently occupies the same register, and pretty much is
* the same thing. There are some differences in the upper bits,
* but we don't care about those.
*/
/*
* Window 4 registers.
*/
/*
* cards.
*/
/*
* Counter in window 4 for packets with a bad start-of-stream delimiter/
*/
/*
* Upper bits of 20-bit byte counters.
*/
/*
* W6 registers, used for statistics
*/
/*
* Receive filter bits for use with CMD_SET_FILTER.
*/
/*
* Window 7 registers. These are different for 90x and 90xB than
* for the EtherLink III / Fast EtherLink cards.
*/
/*
* The Internal Config register is different on 90xB cards. The
* different masks / shifts are defined here.
*/
/*
* Lower 16 bits.
*/
/*
* Upper 16 bits.
*/
/*
* ID of internal PHY.
*/
/*
* Fragment header as laid out in memory for DMA access.
*/
/*
* 3Com NICs have separate structures for packet upload (receive) and
* download (transmit) descriptors. However, the structures for the
* "legacy" transmit format are nearly identical except for the fact
* that the third field is named differently and the bit fields are
* different. To maximize code reuse, we use a single type to cover
* both uses. Note that for receive we can arrange these in a loop,
* but not for transmit. Note also that for simplicity, we only use
* the "type 0" legacy DPD format -- the features offered by the newer
* type 1 format are not something we need.
*/
typedef struct ex_pd {
} ex_pd_t;
/*
* Type 0 Download Packet Descriptor (DPD). We don't use the other
* type, since it isn't supported by older 90x ASICs.
*/
struct ex_dpd {
};
struct ex_upd {
};
#define DPD_DMADDR(s, t) \
/*
* Frame Start Header bitfields.
*/
/*
* Lower 12 bits are the tx length for the 90x family. The 90xB
* assumes that the tx length is the sum of all frame lengths,
* and uses the bits as below. It also defines some more bits in
* the upper part.
*/
/* 0 -> dword, 2 -> word, 1,3 -> none */
/*
* upd_pktstatus bitfields.
* The *CKSUMERR fields are only valid if the matching *CHECKED field
* is set.
*/
/*
* EEPROM offsets. These are 16-bit word addresses. There are a lot of
* other things in here, but we only care about the OEM address.
*/
typedef struct ex_desc {
} ex_desc_t;
typedef struct ex_ring {
int r_count;
int r_avail;
} ex_ring_t;
/*
* Higher level linked list of upload packet descriptors.
*/
struct ex_rxdesc {
};
/*
* Ethernet software status per interface.
*/
typedef struct ex_softc {
unsigned ex_mccount;
/*
* Kstats.
*/
unsigned ex_toolong;
unsigned ex_runt;
unsigned ex_oflo;
unsigned ex_fcs;
unsigned ex_align;
unsigned ex_allocbfail;
unsigned ex_txerr;
unsigned ex_uflo;
unsigned ex_jabber;
unsigned ex_excoll;
unsigned ex_sqe;
unsigned ex_nocarrier;
unsigned ex_multcol;
unsigned ex_defer;
unsigned ex_latecol;
unsigned ex_singlecol;
} elxl_t;
{ \
int stat; \
do { \
}
#endif /* ELXL_H */