Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bnxt/bnxt.h
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
#define BNXT_HWRM_UNLOCK(_softc) mtx_unlock(&(_softc)->hwrm_lock) | #define BNXT_HWRM_UNLOCK(_softc) mtx_unlock(&(_softc)->hwrm_lock) | ||||
#define BNXT_HWRM_LOCK_DESTROY(_softc) mtx_destroy(&(_softc)->hwrm_lock) | #define BNXT_HWRM_LOCK_DESTROY(_softc) mtx_destroy(&(_softc)->hwrm_lock) | ||||
#define BNXT_HWRM_LOCK_ASSERT(_softc) mtx_assert(&(_softc)->hwrm_lock, \ | #define BNXT_HWRM_LOCK_ASSERT(_softc) mtx_assert(&(_softc)->hwrm_lock, \ | ||||
MA_OWNED) | MA_OWNED) | ||||
/* Chip info */ | /* Chip info */ | ||||
#define BNXT_TSO_SIZE UINT16_MAX | #define BNXT_TSO_SIZE UINT16_MAX | ||||
#define min_t(type, x, y) ({ \ | |||||
type __min1 = (x); \ | |||||
type __min2 = (y); \ | |||||
__min1 < __min2 ? __min1 : __min2; }) | |||||
#define max_t(type, x, y) ({ \ | |||||
type __max1 = (x); \ | |||||
type __max2 = (y); \ | |||||
__max1 > __max2 ? __max1 : __max2; }) | |||||
#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) | |||||
/* NVRAM access */ | /* NVRAM access */ | ||||
enum bnxt_nvm_directory_type { | enum bnxt_nvm_directory_type { | ||||
BNX_DIR_TYPE_UNUSED = 0, | BNX_DIR_TYPE_UNUSED = 0, | ||||
BNX_DIR_TYPE_PKG_LOG = 1, | BNX_DIR_TYPE_PKG_LOG = 1, | ||||
BNX_DIR_TYPE_UPDATE = 2, | BNX_DIR_TYPE_UPDATE = 2, | ||||
BNX_DIR_TYPE_CHIMP_PATCH = 3, | BNX_DIR_TYPE_CHIMP_PATCH = 3, | ||||
BNX_DIR_TYPE_BOOTCODE = 4, | BNX_DIR_TYPE_BOOTCODE = 4, | ||||
BNX_DIR_TYPE_VPD = 5, | BNX_DIR_TYPE_VPD = 5, | ||||
▲ Show 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | #define BNXT_MAX_QUEUE 8 | ||||
struct sysctl_ctx_list hw_stats; | struct sysctl_ctx_list hw_stats; | ||||
struct sysctl_oid *hw_stats_oid; | struct sysctl_oid *hw_stats_oid; | ||||
struct bnxt_ver_info *ver_info; | struct bnxt_ver_info *ver_info; | ||||
struct bnxt_nvram_info *nvm_info; | struct bnxt_nvram_info *nvm_info; | ||||
bool wol; | bool wol; | ||||
uint8_t wol_filter_id; | uint8_t wol_filter_id; | ||||
uint16_t rx_coal_usecs; | |||||
uint16_t rx_coal_usecs_irq; | |||||
uint16_t rx_coal_frames; | |||||
uint16_t rx_coal_frames_irq; | |||||
uint16_t tx_coal_usecs; | |||||
uint16_t tx_coal_usecs_irq; | |||||
uint16_t tx_coal_frames; | |||||
uint16_t tx_coal_frames_irq; | |||||
#define BNXT_USEC_TO_COAL_TIMER(x) ((x) * 25 / 2) | |||||
#define BNXT_DEF_STATS_COAL_TICKS 1000000 | |||||
#define BNXT_MIN_STATS_COAL_TICKS 250000 | |||||
#define BNXT_MAX_STATS_COAL_TICKS 1000000 | |||||
}; | }; | ||||
struct bnxt_filter_info { | struct bnxt_filter_info { | ||||
STAILQ_ENTRY(bnxt_filter_info) next; | STAILQ_ENTRY(bnxt_filter_info) next; | ||||
uint64_t fw_l2_filter_id; | uint64_t fw_l2_filter_id; | ||||
#define INVALID_MAC_INDEX ((uint16_t)-1) | #define INVALID_MAC_INDEX ((uint16_t)-1) | ||||
uint16_t mac_index; | uint16_t mac_index; | ||||
Show All 27 Lines |