Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bnxt/bnxt.h
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | |||||
#define max_t(type, x, y) ({ \ | #define max_t(type, x, y) ({ \ | ||||
type __max1 = (x); \ | type __max1 = (x); \ | ||||
type __max2 = (y); \ | type __max2 = (y); \ | ||||
__max1 > __max2 ? __max1 : __max2; }) | __max1 > __max2 ? __max1 : __max2; }) | ||||
#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) | #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) | ||||
#define BNXT_IFMEDIA_ADD(supported, fw_speed, ifm_speed) do { \ | |||||
if ((supported) & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_ ## fw_speed) \ | |||||
ifmedia_add(softc->media, IFM_ETHER | (ifm_speed), 0, NULL); \ | |||||
} while(0) | |||||
/* 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 421 Lines • Show Last 20 Lines |