if_fxpreg.h (82425) | if_fxpreg.h (85460) |
---|---|
1/* 2 * Copyright (c) 1995, David Greenman 3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * Copyright (c) 1995, David Greenman 3 * Copyright (c) 2001 Jonathan Lemon <jlemon@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/fxp/if_fxpreg.h 82425 2001-08-27 16:07:12Z jlemon $ | 28 * $FreeBSD: head/sys/dev/fxp/if_fxpreg.h 85460 2001-10-25 05:25:58Z jlemon $ |
29 */ 30 31#define FXP_VENDORID_INTEL 0x8086 32 33#define FXP_PCI_MMBA 0x10 34#define FXP_PCI_IOBA 0x14 35 36/* --- 179 unchanged lines hidden (view full) --- 216 struct mbuf *mb_head; 217 volatile u_int16_t cb_status; 218 volatile u_int16_t cb_command; 219 volatile u_int32_t link_addr; 220 volatile u_int16_t mc_cnt; 221 volatile u_int8_t mc_addr[MAXMCADDR][6]; 222}; 223 | 29 */ 30 31#define FXP_VENDORID_INTEL 0x8086 32 33#define FXP_PCI_MMBA 0x10 34#define FXP_PCI_IOBA 0x14 35 36/* --- 179 unchanged lines hidden (view full) --- 216 struct mbuf *mb_head; 217 volatile u_int16_t cb_status; 218 volatile u_int16_t cb_command; 219 volatile u_int32_t link_addr; 220 volatile u_int16_t mc_cnt; 221 volatile u_int8_t mc_addr[MAXMCADDR][6]; 222}; 223 |
224#define MAXUCODESIZE 192 225struct fxp_cb_ucode { 226 void *fill[2]; 227 u_int16_t cb_status; 228 u_int16_t cb_command; 229 u_int32_t link_addr; 230 u_int32_t ucode[MAXUCODESIZE]; 231}; 232 |
|
224/* 225 * Number of DMA segments in a TxCB. Note that this is carefully 226 * chosen to make the total struct size an even power of two. It's 227 * critical that no TxCB be split across a page boundry since 228 * no attempt is made to allocate physically contiguous memory. | 233/* 234 * Number of DMA segments in a TxCB. Note that this is carefully 235 * chosen to make the total struct size an even power of two. It's 236 * critical that no TxCB be split across a page boundry since 237 * no attempt is made to allocate physically contiguous memory. |
229 * | |
230 */ | 238 */ |
231#ifdef __alpha__ /* XXX - should be conditional on pointer size */ 232#define FXP_NTXSEG 28 233#else 234#define FXP_NTXSEG 29 235#endif | 239#define FXP_TXCB_FIXED 16 /* cb_status .. tbd_number */ 240#define FXP_NTXSEG ((256 - (sizeof(void *) * 2) - FXP_TXCB_FIXED) / 8) |
236 237struct fxp_tbd { 238 volatile u_int32_t tb_addr; 239 volatile u_int32_t tb_size; 240}; 241struct fxp_cb_tx { 242 struct fxp_cb_tx *next; 243 struct mbuf *mb_head; --- 21 unchanged lines hidden (view full) --- 265#define FXP_CB_STATUS_OK 0x2000 266#define FXP_CB_STATUS_C 0x8000 267/* commands */ 268#define FXP_CB_COMMAND_NOP 0x0 269#define FXP_CB_COMMAND_IAS 0x1 270#define FXP_CB_COMMAND_CONFIG 0x2 271#define FXP_CB_COMMAND_MCAS 0x3 272#define FXP_CB_COMMAND_XMIT 0x4 | 241 242struct fxp_tbd { 243 volatile u_int32_t tb_addr; 244 volatile u_int32_t tb_size; 245}; 246struct fxp_cb_tx { 247 struct fxp_cb_tx *next; 248 struct mbuf *mb_head; --- 21 unchanged lines hidden (view full) --- 270#define FXP_CB_STATUS_OK 0x2000 271#define FXP_CB_STATUS_C 0x8000 272/* commands */ 273#define FXP_CB_COMMAND_NOP 0x0 274#define FXP_CB_COMMAND_IAS 0x1 275#define FXP_CB_COMMAND_CONFIG 0x2 276#define FXP_CB_COMMAND_MCAS 0x3 277#define FXP_CB_COMMAND_XMIT 0x4 |
273#define FXP_CB_COMMAND_RESRV 0x5 | 278#define FXP_CB_COMMAND_UCODE 0x5 |
274#define FXP_CB_COMMAND_DUMP 0x6 275#define FXP_CB_COMMAND_DIAG 0x7 276/* command flags */ 277#define FXP_CB_COMMAND_SF 0x0008 /* simple/flexible mode */ 278#define FXP_CB_COMMAND_I 0x2000 /* generate interrupt on completion */ 279#define FXP_CB_COMMAND_S 0x4000 /* suspend on completion */ 280#define FXP_CB_COMMAND_EL 0x8000 /* end of list */ 281 --- 81 unchanged lines hidden (view full) --- 363#define FXP_PHY_82553C 2 364#define FXP_PHY_82503 3 365#define FXP_PHY_DP83840 4 366#define FXP_PHY_80C240 5 367#define FXP_PHY_80C24 6 368#define FXP_PHY_82555 7 369#define FXP_PHY_DP83840A 10 370#define FXP_PHY_82555B 11 | 279#define FXP_CB_COMMAND_DUMP 0x6 280#define FXP_CB_COMMAND_DIAG 0x7 281/* command flags */ 282#define FXP_CB_COMMAND_SF 0x0008 /* simple/flexible mode */ 283#define FXP_CB_COMMAND_I 0x2000 /* generate interrupt on completion */ 284#define FXP_CB_COMMAND_S 0x4000 /* suspend on completion */ 285#define FXP_CB_COMMAND_EL 0x8000 /* end of list */ 286 --- 81 unchanged lines hidden (view full) --- 368#define FXP_PHY_82553C 2 369#define FXP_PHY_82503 3 370#define FXP_PHY_DP83840 4 371#define FXP_PHY_80C240 5 372#define FXP_PHY_80C24 6 373#define FXP_PHY_82555 7 374#define FXP_PHY_DP83840A 10 375#define FXP_PHY_82555B 11 |
376 377/* 378 * Chip revision values. 379 */ 380#define FXP_REV_82557 1 /* catchall 82557 chip type */ 381#define FXP_REV_82558_A4 4 /* 82558 A4 stepping */ 382#define FXP_REV_82558_B0 5 /* 82558 B0 stepping */ 383#define FXP_REV_82559_A0 8 /* 82559 A0 stepping */ 384#define FXP_REV_82559S_A 9 /* 82559S A stepping */ 385#define FXP_REV_82550 12 386#define FXP_REV_82550_C 13 /* 82550 C stepping */ |
|