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 --- 10 unchanged lines hidden (view full) --- 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: if_fxpreg.h,v 1.10 1997/09/05 10:23:56 davidg Exp $ |
28 */ 29 30#define FXP_VENDORID_INTEL 0x8086 31#define FXP_DEVICEID_i82557 0x1229 32 33#define FXP_PCI_MMBA 0x10 34#define FXP_PCI_IOBA 0x14 35 --- 37 unchanged lines hidden (view full) --- 73 74#define FXP_SCB_STATACK_SWI 0x04 75#define FXP_SCB_STATACK_MDI 0x08 76#define FXP_SCB_STATACK_RNR 0x10 77#define FXP_SCB_STATACK_CNA 0x20 78#define FXP_SCB_STATACK_FR 0x40 79#define FXP_SCB_STATACK_CXTNO 0x80 80 |
81#define FXP_SCB_COMMAND_CU_NOP 0x00 82#define FXP_SCB_COMMAND_CU_START 0x10 83#define FXP_SCB_COMMAND_CU_RESUME 0x20 84#define FXP_SCB_COMMAND_CU_DUMP_ADR 0x40 85#define FXP_SCB_COMMAND_CU_DUMP 0x50 86#define FXP_SCB_COMMAND_CU_BASE 0x60 87#define FXP_SCB_COMMAND_CU_DUMPRESET 0x70 88 --- 4 unchanged lines hidden (view full) --- 93#define FXP_SCB_COMMAND_RU_LOADHDS 5 94#define FXP_SCB_COMMAND_RU_BASE 6 95#define FXP_SCB_COMMAND_RU_RBDRESUME 7 96 97/* 98 * Command block definitions 99 */ 100struct fxp_cb_nop { |
101 void *fill[2]; |
102 volatile u_int16_t cb_status; 103 volatile u_int16_t cb_command; 104 volatile u_int32_t link_addr; 105}; 106struct fxp_cb_ias { |
107 void *fill[2]; |
108 volatile u_int16_t cb_status; 109 volatile u_int16_t cb_command; 110 volatile u_int32_t link_addr; 111 volatile u_int8_t macaddr[6]; 112}; 113/* I hate bit-fields :-( */ 114struct fxp_cb_config { |
115 void *fill[2]; |
116 volatile u_int16_t cb_status; 117 volatile u_int16_t cb_command; 118 volatile u_int32_t link_addr; 119 volatile u_int8_t byte_count:6, 120 :2; 121 volatile u_int8_t rx_fifo_limit:4, 122 tx_fifo_limit:3, 123 :1; --- 41 unchanged lines hidden (view full) --- 165 fdx_pin_en:1; 166 volatile u_int8_t :6, 167 multi_ia:1, 168 :1; 169 volatile u_int8_t :3, 170 mc_all:1, 171 :4; 172}; |
173 174#define MAXMCADDR 80 175struct fxp_cb_mcs { 176 struct fxp_cb_tx *next; 177 struct mbuf *mb_head; 178 volatile u_int16_t cb_status; 179 volatile u_int16_t cb_command; 180 volatile u_int32_t link_addr; 181 volatile u_int16_t mc_cnt; 182 volatile u_int8_t mc_addr[MAXMCADDR][6]; 183}; 184 185/* 186 * Number of DMA segments in a TxCB. Note that this is carefully 187 * chosen to make the total struct size an even power of two. It's 188 * critical that no TxCB be split across a page boundry since 189 * no attempt is made to allocate physically contiguous memory. 190 * 191 */ 192#ifdef __alpha__ /* XXX - should be conditional on pointer size */ 193#define FXP_NTXSEG 28 194#else 195#define FXP_NTXSEG 29 196#endif 197 |
198struct fxp_tbd { 199 volatile u_int32_t tb_addr; 200 volatile u_int32_t tb_size; 201}; |
202struct fxp_cb_tx { |
203 struct fxp_cb_tx *next; 204 struct mbuf *mb_head; |
205 volatile u_int16_t cb_status; 206 volatile u_int16_t cb_command; 207 volatile u_int32_t link_addr; 208 volatile u_int32_t tbd_array_addr; 209 volatile u_int16_t byte_count; 210 volatile u_int8_t tx_threshold; 211 volatile u_int8_t tbd_number; 212 /* 213 * The following isn't actually part of the TxCB. 214 */ |
215 volatile struct fxp_tbd tbd[FXP_NTXSEG]; |
216}; 217 218/* 219 * Control Block (CB) definitions 220 */ 221 222/* status */ 223#define FXP_CB_STATUS_OK 0x2000 224#define FXP_CB_STATUS_C 0x8000 225/* commands */ 226#define FXP_CB_COMMAND_NOP 0x0 227#define FXP_CB_COMMAND_IAS 0x1 228#define FXP_CB_COMMAND_CONFIG 0x2 |
229#define FXP_CB_COMMAND_MCAS 0x3 |
230#define FXP_CB_COMMAND_XMIT 0x4 231#define FXP_CB_COMMAND_RESRV 0x5 232#define FXP_CB_COMMAND_DUMP 0x6 233#define FXP_CB_COMMAND_DIAG 0x7 234/* command flags */ 235#define FXP_CB_COMMAND_SF 0x0008 /* simple/flexible mode */ 236#define FXP_CB_COMMAND_I 0x2000 /* generate interrupt on completion */ 237#define FXP_CB_COMMAND_S 0x4000 /* suspend on completion */ --- 109 unchanged lines hidden --- |