if_epreg.h (50477) | if_epreg.h (51673) |
---|---|
1/* 2 * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 2. The name 8 * of the author may not be used to endorse or promote products derived from --- 5 unchanged lines hidden (view full) --- 14 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 16 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 17 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 18 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 19 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 * | 1/* 2 * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 2. The name 8 * of the author may not be used to endorse or promote products derived from --- 5 unchanged lines hidden (view full) --- 14 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 16 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 17 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 18 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 19 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 * |
22 * if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by: 23 * 24 October 2, 1994 25 26 Modified by: Andres Vega Garcia 27 28 INRIA - Sophia Antipolis, France 29 e-mail: avega@sophia.inria.fr 30 finger: avega@pax.inria.fr 31 | 22 * $FreeBSD: head/sys/dev/ep/if_epreg.h 51673 1999-09-26 06:42:36Z mdodd $ |
32 */ | 23 */ |
33/* 34 * $FreeBSD: head/sys/dev/ep/if_epreg.h 50477 1999-08-28 01:08:13Z peter $ 35 * 36 * Promiscuous mode added and interrupt logic slightly changed 37 * to reduce the number of adapter failures. Transceiver select 38 * logic changed to use value from EEPROM. Autoconfiguration 39 * features added. 40 * Done by: 41 * Serge Babkin 42 * Chelindbank (Chelyabinsk, Russia) 43 * babkin@hq.icb.chel.su 44 */ | |
45 46/* | 24 25/* |
47 * Pccard support for 3C589 by: 48 * HAMADA Naoki 49 * nao@tom-yam.or.jp | 26 * DELAY_MULTIPLE: How much to boost "base" delays, except 27 * for the inter-bit delays in get_eeprom_data. A cyrix Media GX needed this. |
50 */ | 28 */ |
29#define DELAY_MULTIPLE 10 30#define BIT_DELAY_MULTIPLE 10 |
|
51 52/* | 31 32/* |
53 * Ethernet software status per interface. 54 */ 55struct ep_softc { 56 struct arpcom arpcom; /* Ethernet common part */ 57 int ep_io_addr; /* i/o bus address */ 58 struct mbuf *top, *mcur; 59 short cur_len; 60 u_short ep_connectors; /* Connectors on this card. */ 61 u_char ep_connector; /* Configured connector. */ 62 int stat; /* some flags */ 63 int gone; /* adapter is not present (for PCCARD) */ 64#define F_RX_FIRST 0x1 65#define F_PROMISC 0x8 66 67#define F_ACCESS_32_BITS 0x100 68 69 struct ep_board *epb; 70 71 int unit; 72 73#ifdef EP_LOCAL_STATS 74 short tx_underrun; 75 short rx_no_first; 76 short rx_no_mbuf; 77 short rx_bpf_disc; 78 short rx_overrunf; 79 short rx_overrunl; 80#endif 81}; 82 83struct ep_board { 84 int epb_addr; /* address of this board */ 85 char epb_used; /* was this entry already used for configuring ? */ 86 /* data from EEPROM for later use */ 87 u_short eth_addr[3]; /* Ethernet address */ 88 u_short prod_id; /* product ID */ 89 int cmd_off; /* command offset (bit shift) */ 90 int mii_trans; /* activate MII transiever */ 91 u_short res_cfg; /* resource configuration */ 92}; 93 94 95/* | |
96 * Some global constants 97 */ 98#define TX_INIT_RATE 16 99#define TX_INIT_MAX_RATE 64 100#define RX_INIT_LATENCY 64 101#define RX_INIT_EARLY_THRESH 208 /* not less than MINCLSIZE */ 102#define RX_NEXT_EARLY_THRESH 500 103 --- 346 unchanged lines hidden (view full) --- 450#define PROD_ID 0x9150 451 452#define AUI 0x1 453#define BNC 0x2 454#define UTP 0x4 455 456#define RX_BYTES_MASK (u_short) (0x07ff) 457 | 33 * Some global constants 34 */ 35#define TX_INIT_RATE 16 36#define TX_INIT_MAX_RATE 64 37#define RX_INIT_LATENCY 64 38#define RX_INIT_EARLY_THRESH 208 /* not less than MINCLSIZE */ 39#define RX_NEXT_EARLY_THRESH 500 40 --- 346 unchanged lines hidden (view full) --- 387#define PROD_ID 0x9150 388 389#define AUI 0x1 390#define BNC 0x2 391#define UTP 0x4 392 393#define RX_BYTES_MASK (u_short) (0x07ff) 394 |
458extern struct ep_board ep_board[]; 459extern int ep_boards; 460extern u_long ep_unit; 461extern struct ep_softc *ep_alloc __P((int unit, struct ep_board *epb)); 462extern void ep_free __P((struct ep_softc *sc)); 463extern void ep_intr __P((void *sc)); 464extern int ep_attach __P((struct ep_softc *sc)); 465 466extern u_int16_t get_e __P((struct ep_softc *sc, int offset)); 467 | |
468/* 469 * Config flags 470 */ 471#define EP_FLAGS_100TX 0x1 | 395/* 396 * Config flags 397 */ 398#define EP_FLAGS_100TX 0x1 |