Deleted Added
sdiff udiff text old ( 29138 ) new ( 29974 )
full compact
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$
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_MASK 0xff
82#define FXP_SCB_COMMAND_CU_NOP 0x00
83#define FXP_SCB_COMMAND_CU_START 0x10
84#define FXP_SCB_COMMAND_CU_RESUME 0x20
85#define FXP_SCB_COMMAND_CU_DUMP_ADR 0x40
86#define FXP_SCB_COMMAND_CU_DUMP 0x50
87#define FXP_SCB_COMMAND_CU_BASE 0x60
88#define FXP_SCB_COMMAND_CU_DUMPRESET 0x70
89

--- 4 unchanged lines hidden (view full) ---

94#define FXP_SCB_COMMAND_RU_LOADHDS 5
95#define FXP_SCB_COMMAND_RU_BASE 6
96#define FXP_SCB_COMMAND_RU_RBDRESUME 7
97
98/*
99 * Command block definitions
100 */
101struct fxp_cb_nop {
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 volatile u_int16_t cb_status;
108 volatile u_int16_t cb_command;
109 volatile u_int32_t link_addr;
110 volatile u_int8_t macaddr[6];
111};
112/* I hate bit-fields :-( */
113struct fxp_cb_config {
114 volatile u_int16_t cb_status;
115 volatile u_int16_t cb_command;
116 volatile u_int32_t link_addr;
117 volatile u_int8_t byte_count:6,
118 :2;
119 volatile u_int8_t rx_fifo_limit:4,
120 tx_fifo_limit:3,
121 :1;

--- 41 unchanged lines hidden (view full) ---

163 fdx_pin_en:1;
164 volatile u_int8_t :6,
165 multi_ia:1,
166 :1;
167 volatile u_int8_t :3,
168 mc_all:1,
169 :4;
170};
171struct fxp_tbd {
172 volatile u_int32_t tb_addr;
173 volatile u_int32_t tb_size;
174};
175
176struct fxp_cb_tx {
177 volatile u_int16_t cb_status;
178 volatile u_int16_t cb_command;
179 volatile u_int32_t link_addr;
180 volatile u_int32_t tbd_array_addr;
181 volatile u_int16_t byte_count;
182 volatile u_int8_t tx_threshold;
183 volatile u_int8_t tbd_number;
184 /*
185 * The following isn't actually part of the TxCB.
186 */
187 volatile struct fxp_tbd tbd[29];
188 struct mbuf *mb_head;
189 struct fxp_cb_tx *next;
190};
191
192/*
193 * Control Block (CB) definitions
194 */
195
196/* status */
197#define FXP_CB_STATUS_OK 0x2000
198#define FXP_CB_STATUS_C 0x8000
199/* commands */
200#define FXP_CB_COMMAND_NOP 0x0
201#define FXP_CB_COMMAND_IAS 0x1
202#define FXP_CB_COMMAND_CONFIG 0x2
203#define FXP_CB_COMMAND_MAS 0x3
204#define FXP_CB_COMMAND_XMIT 0x4
205#define FXP_CB_COMMAND_RESRV 0x5
206#define FXP_CB_COMMAND_DUMP 0x6
207#define FXP_CB_COMMAND_DIAG 0x7
208/* command flags */
209#define FXP_CB_COMMAND_SF 0x0008 /* simple/flexible mode */
210#define FXP_CB_COMMAND_I 0x2000 /* generate interrupt on completion */
211#define FXP_CB_COMMAND_S 0x4000 /* suspend on completion */

--- 109 unchanged lines hidden ---