if_edvar.h revision 50959
150770Sdfr/* 250770Sdfr * Copyright (c) 1995, David Greenman 350770Sdfr * All rights reserved. 450770Sdfr * 550770Sdfr * Redistribution and use in source and binary forms, with or without 650770Sdfr * modification, are permitted provided that the following conditions 750770Sdfr * are met: 850770Sdfr * 1. Redistributions of source code must retain the above copyright 950770Sdfr * notice unmodified, this list of conditions, and the following 1050770Sdfr * disclaimer. 1150770Sdfr * 2. Redistributions in binary form must reproduce the above copyright 1250770Sdfr * notice, this list of conditions and the following disclaimer in the 1350770Sdfr * documentation and/or other materials provided with the distribution. 1450770Sdfr * 1550770Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1650770Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1750770Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1850770Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1950770Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2050770Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2150770Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2250770Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2350770Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2450770Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2550770Sdfr * SUCH DAMAGE. 2650770Sdfr * 2750959Speter * $FreeBSD: head/sys/dev/ed/if_edvar.h 50959 1999-09-05 15:21:05Z peter $ 2850770Sdfr */ 2950770Sdfr 3050770Sdfr/* 3150770Sdfr * ed_softc: per line info and status 3250770Sdfr */ 3350770Sdfrstruct ed_softc { 3450770Sdfr struct arpcom arpcom; /* ethernet common */ 3550770Sdfr 3650770Sdfr char *type_str; /* pointer to type string */ 3750770Sdfr u_char vendor; /* interface vendor */ 3850770Sdfr u_char type; /* interface type code */ 3950770Sdfr u_char gone; /* HW missing, presumed having a good time */ 4050770Sdfr 4150770Sdfr int port_rid; /* resource id for port range */ 4250770Sdfr int port_used; /* nonzero if ports used */ 4350770Sdfr struct resource* port_res; /* resource for port range */ 4450770Sdfr int mem_rid; /* resource id for memory range */ 4550770Sdfr int mem_used; /* nonzero if memory used */ 4650770Sdfr struct resource* mem_res; /* resource for memory range */ 4750770Sdfr int irq_rid; /* resource id for irq */ 4850770Sdfr struct resource* irq_res; /* resource for irq */ 4950770Sdfr void* irq_handle; /* handle for irq handler */ 5050770Sdfr 5150770Sdfr u_short asic_addr; /* ASIC I/O bus address */ 5250770Sdfr u_short nic_addr; /* NIC (DS8390) I/O bus address */ 5350770Sdfr 5450770Sdfr/* 5550770Sdfr * The following 'proto' variable is part of a work-around for 8013EBT asics 5650770Sdfr * being write-only. It's sort of a prototype/shadow of the real thing. 5750770Sdfr */ 5850770Sdfr u_char wd_laar_proto; 5950770Sdfr u_char cr_proto; 6050770Sdfr u_char isa16bit; /* width of access to card 0=8 or 1=16 */ 6150770Sdfr int is790; /* set by the probe code if the card is 790 6250770Sdfr * based */ 6350770Sdfr 6450770Sdfr/* 6550770Sdfr * HP PC LAN PLUS card support. 6650770Sdfr */ 6750770Sdfr 6850770Sdfr u_short hpp_options; /* flags controlling behaviour of the HP card */ 6950770Sdfr u_short hpp_id; /* software revision and other fields */ 7050770Sdfr caddr_t hpp_mem_start; /* Memory-mapped IO register address */ 7150770Sdfr 7250770Sdfr caddr_t mem_start; /* NIC memory start address */ 7350770Sdfr caddr_t mem_end; /* NIC memory end address */ 7450770Sdfr u_long mem_size; /* total NIC memory size */ 7550770Sdfr caddr_t mem_ring; /* start of RX ring-buffer (in NIC mem) */ 7650770Sdfr 7750770Sdfr u_char mem_shared; /* NIC memory is shared with host */ 7850770Sdfr u_char xmit_busy; /* transmitter is busy */ 7950770Sdfr u_char txb_cnt; /* number of transmit buffers */ 8050770Sdfr u_char txb_inuse; /* number of TX buffers currently in-use */ 8150770Sdfr 8250770Sdfr u_char txb_new; /* pointer to where new buffer will be added */ 8350770Sdfr u_char txb_next_tx; /* pointer to next buffer ready to xmit */ 8450770Sdfr u_short txb_len[8]; /* buffered xmit buffer lengths */ 8550770Sdfr u_char tx_page_start; /* first page of TX buffer area */ 8650770Sdfr u_char rec_page_start; /* first page of RX ring-buffer */ 8750770Sdfr u_char rec_page_stop; /* last page of RX ring-buffer */ 8850770Sdfr u_char next_packet; /* pointer to next unread RX packet */ 8950770Sdfr struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */ 9050770Sdfr}; 91