1 /* $NetBSD: if_nfevar.h,v 1.8 2008/04/17 19:12:26 christos Exp $ */
2 /* $OpenBSD: if_nfevar.h,v 1.13 2007/12/05 08:30:33 jsg Exp $ */
5 * Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #define NFE_IFQ_MAXLEN 64
30 bus_dma_segment_t seg
;
32 struct nfe_desc32
*desc32
;
33 struct nfe_desc64
*desc64
;
34 struct nfe_tx_data data
[NFE_TX_RING_COUNT
];
43 SLIST_ENTRY(nfe_jbuf
) jnext
;
53 bus_dma_segment_t seg
;
55 bus_dma_segment_t jseg
;
57 struct nfe_desc32
*desc32
;
58 struct nfe_desc64
*desc64
;
60 struct nfe_rx_data data
[NFE_RX_RING_COUNT
];
61 struct nfe_jbuf jbuf
[NFE_JPOOL_COUNT
];
62 int jbufmap
[NFE_RX_RING_COUNT
];
63 SLIST_HEAD(, nfe_jbuf
) jfreelist
;
72 struct ethercom sc_ethercom
;
73 uint8_t sc_enaddr
[ETHER_ADDR_LEN
];
74 bus_space_handle_t sc_memh
;
75 bus_space_tag_t sc_memt
;
77 bus_dma_tag_t sc_dmat
;
78 struct mii_data sc_mii
;
79 struct callout sc_tick_ch
;
83 #define NFE_JUMBO_SUP 0x01
84 #define NFE_40BIT_ADDR 0x02
85 #define NFE_HW_CSUM 0x04
86 #define NFE_HW_VLAN 0x08
87 #define NFE_USE_JUMBO 0x10
88 #define NFE_CORRECT_MACADDR 0x20
89 #define NFE_PWR_MGMT 0x40
94 struct nfe_tx_ring txq
;
95 struct nfe_rx_ring rxq
;