if_edvar.h revision 50770
1/* 2 * Copyright (c) 1995, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice unmodified, this list of conditions, and the following 10 * disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * $Id$ 28 */ 29 30/* 31 * ed_softc: per line info and status 32 */ 33struct ed_softc { 34 struct arpcom arpcom; /* ethernet common */ 35 36 char *type_str; /* pointer to type string */ 37 u_char vendor; /* interface vendor */ 38 u_char type; /* interface type code */ 39 u_char gone; /* HW missing, presumed having a good time */ 40 41 int port_rid; /* resource id for port range */ 42 int port_used; /* nonzero if ports used */ 43 struct resource* port_res; /* resource for port range */ 44 int mem_rid; /* resource id for memory range */ 45 int mem_used; /* nonzero if memory used */ 46 struct resource* mem_res; /* resource for memory range */ 47 int irq_rid; /* resource id for irq */ 48 struct resource* irq_res; /* resource for irq */ 49 void* irq_handle; /* handle for irq handler */ 50 51 u_short asic_addr; /* ASIC I/O bus address */ 52 u_short nic_addr; /* NIC (DS8390) I/O bus address */ 53 54/* 55 * The following 'proto' variable is part of a work-around for 8013EBT asics 56 * being write-only. It's sort of a prototype/shadow of the real thing. 57 */ 58 u_char wd_laar_proto; 59 u_char cr_proto; 60 u_char isa16bit; /* width of access to card 0=8 or 1=16 */ 61 int is790; /* set by the probe code if the card is 790 62 * based */ 63 64/* 65 * HP PC LAN PLUS card support. 66 */ 67 68 u_short hpp_options; /* flags controlling behaviour of the HP card */ 69 u_short hpp_id; /* software revision and other fields */ 70 caddr_t hpp_mem_start; /* Memory-mapped IO register address */ 71 72 caddr_t mem_start; /* NIC memory start address */ 73 caddr_t mem_end; /* NIC memory end address */ 74 u_long mem_size; /* total NIC memory size */ 75 caddr_t mem_ring; /* start of RX ring-buffer (in NIC mem) */ 76 77 u_char mem_shared; /* NIC memory is shared with host */ 78 u_char xmit_busy; /* transmitter is busy */ 79 u_char txb_cnt; /* number of transmit buffers */ 80 u_char txb_inuse; /* number of TX buffers currently in-use */ 81 82 u_char txb_new; /* pointer to where new buffer will be added */ 83 u_char txb_next_tx; /* pointer to next buffer ready to xmit */ 84 u_short txb_len[8]; /* buffered xmit buffer lengths */ 85 u_char tx_page_start; /* first page of TX buffer area */ 86 u_char rec_page_start; /* first page of RX ring-buffer */ 87 u_char rec_page_stop; /* last page of RX ring-buffer */ 88 u_char next_packet; /* pointer to next unread RX packet */ 89 struct ifmib_iso_8802_3 mibdata; /* stuff for network mgmt */ 90}; 91