Deleted Added
full compact
if_bgereg.h (164769) if_bgereg.h (164780)
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2001
4 * Bill Paul <wpaul@windriver.com>. 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:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2001
4 * Bill Paul <wpaul@windriver.com>. 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:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/bge/if_bgereg.h 164769 2006-11-30 13:40:39Z glebius $
33 * $FreeBSD: head/sys/dev/bge/if_bgereg.h 164780 2006-12-01 01:08:52Z jkim $
34 */
35
36/*
37 * BCM570x memory map. The internal memory layout varies somewhat
38 * depending on whether or not we have external SSRAM attached.
39 * The BCM5700 can have up to 16MB of external memory. The BCM5701
40 * is apparently not designed to use external SSRAM. The mappings
41 * up to the first 4 send rings are the same for both internal and

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

569#define BGE_RX_BD_RULES_MASKVAL14 0x04F4
570#define BGE_RX_BD_RULES_CTL15 0x04F8
571#define BGE_RX_BD_RULES_MASKVAL15 0x04FC
572#define BGE_RX_RULES_CFG 0x0500
573#define BGE_SERDES_CFG 0x0590
574#define BGE_SERDES_STS 0x0594
575#define BGE_SGDIG_CFG 0x05B0
576#define BGE_SGDIG_STS 0x05B4
34 */
35
36/*
37 * BCM570x memory map. The internal memory layout varies somewhat
38 * depending on whether or not we have external SSRAM attached.
39 * The BCM5700 can have up to 16MB of external memory. The BCM5701
40 * is apparently not designed to use external SSRAM. The mappings
41 * up to the first 4 send rings are the same for both internal and

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

569#define BGE_RX_BD_RULES_MASKVAL14 0x04F4
570#define BGE_RX_BD_RULES_CTL15 0x04F8
571#define BGE_RX_BD_RULES_MASKVAL15 0x04FC
572#define BGE_RX_RULES_CFG 0x0500
573#define BGE_SERDES_CFG 0x0590
574#define BGE_SERDES_STS 0x0594
575#define BGE_SGDIG_CFG 0x05B0
576#define BGE_SGDIG_STS 0x05B4
577#define BGE_RX_STATS 0x0800
578#define BGE_TX_STATS 0x0880
577#define BGE_MAC_STATS 0x0800
579
580/* Ethernet MAC Mode register */
581#define BGE_MACMODE_RESET 0x00000001
582#define BGE_MACMODE_HALF_DUPLEX 0x00000002
583#define BGE_MACMODE_PORTMODE 0x0000000C
584#define BGE_MACMODE_LOOPBACK 0x00000010
585#define BGE_MACMODE_RX_TAGGEDPKT 0x00000080
586#define BGE_MACMODE_TX_BURST_ENB 0x00000100

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

2485 int bge_if_flags;
2486 int bge_txcnt;
2487 int bge_link; /* link state */
2488 int bge_link_evt; /* pending link event */
2489 int bge_timer;
2490 struct callout bge_stat_ch;
2491 char *bge_vpd_prodname;
2492 char *bge_vpd_readonly;
578
579/* Ethernet MAC Mode register */
580#define BGE_MACMODE_RESET 0x00000001
581#define BGE_MACMODE_HALF_DUPLEX 0x00000002
582#define BGE_MACMODE_PORTMODE 0x0000000C
583#define BGE_MACMODE_LOOPBACK 0x00000010
584#define BGE_MACMODE_RX_TAGGEDPKT 0x00000080
585#define BGE_MACMODE_TX_BURST_ENB 0x00000100

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

2484 int bge_if_flags;
2485 int bge_txcnt;
2486 int bge_link; /* link state */
2487 int bge_link_evt; /* pending link event */
2488 int bge_timer;
2489 struct callout bge_stat_ch;
2490 char *bge_vpd_prodname;
2491 char *bge_vpd_readonly;
2493 u_long bge_rx_discards;
2494 u_long bge_tx_discards;
2495 u_long bge_tx_collisions;
2492 uint32_t bge_rx_discards;
2493 uint32_t bge_tx_discards;
2494 uint32_t bge_tx_collisions;
2496#ifdef DEVICE_POLLING
2497 int rxcycles;
2498#endif /* DEVICE_POLLING */
2499};
2500
2501#define BGE_LOCK_INIT(_sc, _name) \
2502 mtx_init(&(_sc)->bge_mtx, _name, MTX_NETWORK_LOCK, MTX_DEF)
2503#define BGE_LOCK(_sc) mtx_lock(&(_sc)->bge_mtx)
2504#define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED)
2505#define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx)
2506#define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx)
2495#ifdef DEVICE_POLLING
2496 int rxcycles;
2497#endif /* DEVICE_POLLING */
2498};
2499
2500#define BGE_LOCK_INIT(_sc, _name) \
2501 mtx_init(&(_sc)->bge_mtx, _name, MTX_NETWORK_LOCK, MTX_DEF)
2502#define BGE_LOCK(_sc) mtx_lock(&(_sc)->bge_mtx)
2503#define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED)
2504#define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx)
2505#define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx)