if_anreg.h (80449) | if_anreg.h (83270) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. 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 --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/dev/an/if_anreg.h 80449 2001-07-27 16:05:21Z brooks $ | 32 * $FreeBSD: head/sys/dev/an/if_anreg.h 83270 2001-09-10 02:36:18Z brooks $ |
33 */ 34 35#define AN_TIMEOUT 65536 36 37/* Default network name: <empty string> */ 38#define AN_DEFAULT_NETNAME "" 39 40/* The nodename must be less than 16 bytes */ --- 223 unchanged lines hidden (view full) --- 264 u_int8_t an_addr2[6]; /* 0x1E */ 265 u_int8_t an_addr3[6]; /* 0x24 */ 266 u_int16_t an_seq_ctl; /* 0x2A */ 267 u_int8_t an_addr4[6]; /* 0x2C */ 268 u_int16_t an_gaplen; /* 0x32 */ 269}; 270 271struct an_rxframe_802_3 { | 33 */ 34 35#define AN_TIMEOUT 65536 36 37/* Default network name: <empty string> */ 38#define AN_DEFAULT_NETNAME "" 39 40/* The nodename must be less than 16 bytes */ --- 223 unchanged lines hidden (view full) --- 264 u_int8_t an_addr2[6]; /* 0x1E */ 265 u_int8_t an_addr3[6]; /* 0x24 */ 266 u_int16_t an_seq_ctl; /* 0x2A */ 267 u_int8_t an_addr4[6]; /* 0x2C */ 268 u_int16_t an_gaplen; /* 0x32 */ 269}; 270 271struct an_rxframe_802_3 { |
272 u_int16_t an_rx_802_3_status; /* 0x34 */ | 272 u_int16_t an_rx_802_3_status; /* 0x34 */ |
273 u_int16_t an_rx_802_3_payload_len;/* 0x36 */ 274 u_int8_t an_rx_dst_addr[6]; /* 0x38 */ 275 u_int8_t an_rx_src_addr[6]; /* 0x3E */ 276}; 277#define AN_RXGAP_MAX 8 278 279 280struct an_txframe_802_3 { 281/* 282 * Transmit 802.3 header structure. 283 */ | 273 u_int16_t an_rx_802_3_payload_len;/* 0x36 */ 274 u_int8_t an_rx_dst_addr[6]; /* 0x38 */ 275 u_int8_t an_rx_src_addr[6]; /* 0x3E */ 276}; 277#define AN_RXGAP_MAX 8 278 279 280struct an_txframe_802_3 { 281/* 282 * Transmit 802.3 header structure. 283 */ |
284 u_int16_t an_tx_802_3_status; /* 0x34 */ | 284 u_int16_t an_tx_802_3_status; /* 0x34 */ |
285 u_int16_t an_tx_802_3_payload_len;/* 0x36 */ 286 u_int8_t an_tx_dst_addr[6]; /* 0x38 */ 287 u_int8_t an_tx_src_addr[6]; /* 0x3E */ 288}; 289 290#define AN_TXSTAT_EXCESS_RETRY 0x0002 291#define AN_TXSTAT_LIFE_EXCEEDED 0x0004 292#define AN_TXSTAT_AID_FAIL 0x0008 --- 39 unchanged lines hidden (view full) --- 332 333struct an_snap_hdr { 334 u_int16_t an_snap_dat[3]; /* SNAP header */ 335 u_int16_t an_snap_type; 336}; 337 338#define AN_TX_RING_CNT 4 339#define AN_INC(x, y) (x) = (x + 1) % y | 285 u_int16_t an_tx_802_3_payload_len;/* 0x36 */ 286 u_int8_t an_tx_dst_addr[6]; /* 0x38 */ 287 u_int8_t an_tx_src_addr[6]; /* 0x3E */ 288}; 289 290#define AN_TXSTAT_EXCESS_RETRY 0x0002 291#define AN_TXSTAT_LIFE_EXCEEDED 0x0004 292#define AN_TXSTAT_AID_FAIL 0x0008 --- 39 unchanged lines hidden (view full) --- 332 333struct an_snap_hdr { 334 u_int16_t an_snap_dat[3]; /* SNAP header */ 335 u_int16_t an_snap_type; 336}; 337 338#define AN_TX_RING_CNT 4 339#define AN_INC(x, y) (x) = (x + 1) % y |
340 341struct an_tx_ring_data { | 340 341struct an_tx_ring_data { |
342 u_int16_t an_tx_fids[AN_TX_RING_CNT]; 343 u_int16_t an_tx_ring[AN_TX_RING_CNT]; 344 int an_tx_prod; 345 int an_tx_cons; 346}; 347 348struct an_softc { 349 struct arpcom arpcom; 350 351 int an_unit; | 342 u_int16_t an_tx_fids[AN_TX_RING_CNT]; 343 u_int16_t an_tx_ring[AN_TX_RING_CNT]; 344 int an_tx_prod; 345 int an_tx_cons; 346}; 347 348struct an_softc { 349 struct arpcom arpcom; 350 351 int an_unit; |
352 | 352 |
353 int port_rid; /* resource id for port range */ 354 struct resource* port_res; /* resource for port range */ 355 int irq_rid; /* resource id for irq */ 356 struct resource* irq_res; /* resource for irq */ 357 void* irq_handle; /* handle for irq handler */ 358 359 bus_space_handle_t an_bhandle_p; 360 bus_space_handle_t an_bhandle; --- 79 unchanged lines hidden --- | 353 int port_rid; /* resource id for port range */ 354 struct resource* port_res; /* resource for port range */ 355 int irq_rid; /* resource id for irq */ 356 struct resource* irq_res; /* resource for irq */ 357 void* irq_handle; /* handle for irq handler */ 358 359 bus_space_handle_t an_bhandle_p; 360 bus_space_handle_t an_bhandle; --- 79 unchanged lines hidden --- |