if_bcereg.h (247565) | if_bcereg.h (251142) |
---|---|
1/*- 2 * Copyright (c) 2006-2010 Broadcom Corporation 3 * David Christensen <davidch@broadcom.com>. 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 --- 12 unchanged lines hidden (view full) --- 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2006-2010 Broadcom Corporation 3 * David Christensen <davidch@broadcom.com>. 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 --- 12 unchanged lines hidden (view full) --- 21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/bce/if_bcereg.h 247565 2013-03-01 19:12:38Z marius $ | 29 * $FreeBSD: head/sys/dev/bce/if_bcereg.h 251142 2013-05-30 16:09:56Z marius $ |
30 */ 31 32#ifndef _BCEREG_H_DEFINED 33#define _BCEREG_H_DEFINED 34 | 30 */ 31 32#ifndef _BCEREG_H_DEFINED 33#define _BCEREG_H_DEFINED 34 |
35#ifdef HAVE_KERNEL_OPTION_HEADERS 36#include "opt_device_polling.h" 37#endif 38 | |
39#include <sys/param.h> 40#include <sys/endian.h> 41#include <sys/systm.h> 42#include <sys/sockio.h> 43#include <sys/mbuf.h> 44#include <sys/malloc.h> 45#include <sys/kernel.h> 46#include <sys/module.h> --- 6284 unchanged lines hidden (view full) --- 6331 u32 sbss_len; 6332 u32 sbss_index; 6333 const u32 *sbss; 6334 6335 /* BSS section. */ 6336 u32 bss_addr; 6337 u32 bss_len; 6338 u32 bss_index; | 35#include <sys/param.h> 36#include <sys/endian.h> 37#include <sys/systm.h> 38#include <sys/sockio.h> 39#include <sys/mbuf.h> 40#include <sys/malloc.h> 41#include <sys/kernel.h> 42#include <sys/module.h> --- 6284 unchanged lines hidden (view full) --- 6327 u32 sbss_len; 6328 u32 sbss_index; 6329 const u32 *sbss; 6330 6331 /* BSS section. */ 6332 u32 bss_addr; 6333 u32 bss_len; 6334 u32 bss_index; |
6339 u32 *bss; | 6335 const u32 *bss; |
6340 6341 /* Read-only section. */ 6342 u32 rodata_addr; 6343 u32 rodata_len; 6344 u32 rodata_index; | 6336 6337 /* Read-only section. */ 6338 u32 rodata_addr; 6339 u32 rodata_len; 6340 u32 rodata_index; |
6345 u32 *rodata; | 6341 const u32 *rodata; |
6346}; 6347 6348#define RV2P_PROC1 0 6349#define RV2P_PROC2 1 6350 6351#define BCE_MIREG(x) ((x & 0x1F) << 16) 6352#define BCE_MIPHY(x) ((x & 0x1F) << 21) 6353#define BCE_PHY_TIMEOUT 50 --- 62 unchanged lines hidden (view full) --- 6416#define BCE_STATUS_BLK_SZ sizeof(struct status_block) 6417#define BCE_STATS_BLK_SZ sizeof(struct statistics_block) 6418#define BCE_TX_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6419#define BCE_RX_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6420#define BCE_PG_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6421 6422struct bce_softc 6423{ | 6342}; 6343 6344#define RV2P_PROC1 0 6345#define RV2P_PROC2 1 6346 6347#define BCE_MIREG(x) ((x & 0x1F) << 16) 6348#define BCE_MIPHY(x) ((x & 0x1F) << 21) 6349#define BCE_PHY_TIMEOUT 50 --- 62 unchanged lines hidden (view full) --- 6412#define BCE_STATUS_BLK_SZ sizeof(struct status_block) 6413#define BCE_STATS_BLK_SZ sizeof(struct statistics_block) 6414#define BCE_TX_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6415#define BCE_RX_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6416#define BCE_PG_CHAIN_PAGE_SZ BCM_PAGE_SIZE 6417 6418struct bce_softc 6419{ |
6420 struct mtx bce_mtx; 6421 |
|
6424 /* Interface info */ 6425 struct ifnet *bce_ifp; 6426 6427 /* Parent device handle */ 6428 device_t bce_dev; 6429 6430 /* Interface number */ 6431 u_int8_t bce_unit; --- 11 unchanged lines hidden (view full) --- 6443 bus_space_handle_t bce_bhandle; 6444 6445 /* Device virtual memory handle */ 6446 vm_offset_t bce_vhandle; 6447 6448 /* IRQ Resource Handle */ 6449 struct resource *bce_res_irq; 6450 | 6422 /* Interface info */ 6423 struct ifnet *bce_ifp; 6424 6425 /* Parent device handle */ 6426 device_t bce_dev; 6427 6428 /* Interface number */ 6429 u_int8_t bce_unit; --- 11 unchanged lines hidden (view full) --- 6441 bus_space_handle_t bce_bhandle; 6442 6443 /* Device virtual memory handle */ 6444 vm_offset_t bce_vhandle; 6445 6446 /* IRQ Resource Handle */ 6447 struct resource *bce_res_irq; 6448 |
6451 struct mtx bce_mtx; 6452 | |
6453 /* Interrupt handler. */ 6454 void *bce_intrhand; 6455 6456 /* ASIC Chip ID. */ 6457 u32 bce_chipid; 6458 6459 /* General controller flags. */ 6460 u32 bce_flags; --- 97 unchanged lines hidden (view full) --- 6558 u16 bce_rx_quick_cons_trip_int; 6559 u16 bce_rx_quick_cons_trip; 6560 u16 bce_tx_ticks_int; 6561 u16 bce_tx_ticks; 6562 u16 bce_rx_ticks_int; 6563 u16 bce_rx_ticks; 6564 u32 bce_stats_ticks; 6565 | 6449 /* Interrupt handler. */ 6450 void *bce_intrhand; 6451 6452 /* ASIC Chip ID. */ 6453 u32 bce_chipid; 6454 6455 /* General controller flags. */ 6456 u32 bce_flags; --- 97 unchanged lines hidden (view full) --- 6554 u16 bce_rx_quick_cons_trip_int; 6555 u16 bce_rx_quick_cons_trip; 6556 u16 bce_tx_ticks_int; 6557 u16 bce_tx_ticks; 6558 u16 bce_rx_ticks_int; 6559 u16 bce_rx_ticks; 6560 u32 bce_stats_ticks; 6561 |
6566 /* ToDo: Can these be removed? */ 6567 u16 bce_comp_prod_trip_int; 6568 u16 bce_comp_prod_trip; 6569 u16 bce_com_ticks_int; 6570 u16 bce_com_ticks; 6571 u16 bce_cmd_ticks_int; 6572 u16 bce_cmd_ticks; 6573 | |
6574 /* The address of the integrated PHY on the MII bus. */ 6575 int bce_phy_addr; 6576 6577 /* The device handle for the MII bus child device. */ 6578 device_t bce_miibus; 6579 6580 /* Driver maintained RX chain pointers and byte counter. */ 6581 u16 rx_prod; --- 16 unchanged lines hidden (view full) --- 6598 int bce_link_up; 6599 struct callout bce_tick_callout; 6600 struct callout bce_pulse_callout; 6601 6602 /* Ticks until chip reset */ 6603 int watchdog_timer; 6604 6605 /* Frame size and mbuf allocation size for RX frames. */ | 6562 /* The address of the integrated PHY on the MII bus. */ 6563 int bce_phy_addr; 6564 6565 /* The device handle for the MII bus child device. */ 6566 device_t bce_miibus; 6567 6568 /* Driver maintained RX chain pointers and byte counter. */ 6569 u16 rx_prod; --- 16 unchanged lines hidden (view full) --- 6586 int bce_link_up; 6587 struct callout bce_tick_callout; 6588 struct callout bce_pulse_callout; 6589 6590 /* Ticks until chip reset */ 6591 int watchdog_timer; 6592 6593 /* Frame size and mbuf allocation size for RX frames. */ |
6606 u32 max_frame_size; | |
6607 int rx_bd_mbuf_alloc_size; 6608 int rx_bd_mbuf_data_len; 6609 int rx_bd_mbuf_align_pad; | 6594 int rx_bd_mbuf_alloc_size; 6595 int rx_bd_mbuf_data_len; 6596 int rx_bd_mbuf_align_pad; |
6610 int pg_bd_mbuf_alloc_size; | |
6611 6612 /* Receive mode settings (i.e promiscuous, multicast, etc.). */ 6613 u32 rx_mode; 6614 6615 /* Bus tag for the bce controller. */ 6616 bus_dma_tag_t parent_tag; 6617 6618 /* H/W maintained TX buffer descriptor chain structure. */ --- 215 unchanged lines hidden --- | 6597 6598 /* Receive mode settings (i.e promiscuous, multicast, etc.). */ 6599 u32 rx_mode; 6600 6601 /* Bus tag for the bce controller. */ 6602 bus_dma_tag_t parent_tag; 6603 6604 /* H/W maintained TX buffer descriptor chain structure. */ --- 215 unchanged lines hidden --- |