drivers/net/ethernet/emulex/benet/be_cmds.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/emulex/benet/be_cmds.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/emulex/benet/be_cmds.h- Extension
.h- Size
- 64188 bytes
- Lines
- 2509
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct be_sgestruct be_mcc_wrbstruct be_mcc_complstruct be_async_event_link_statestruct be_async_event_grp5_qos_link_speedstruct be_async_event_grp5_cos_prioritystruct be_async_event_grp5_pvid_statestruct be_async_event_qnqstruct be_async_event_misconfig_portstruct be_async_fw_controlstruct be_mcc_mailboxstruct be_cmd_req_hdrstruct be_cmd_resp_hdrstruct phys_addrstruct amap_eq_contextstruct be_cmd_req_eq_createstruct be_cmd_resp_eq_createstruct mac_addrstruct be_cmd_req_mac_querystruct be_cmd_resp_mac_querystruct be_cmd_req_pmac_addstruct be_cmd_resp_pmac_addstruct be_cmd_req_pmac_delstruct amap_cq_context_bestruct amap_cq_context_v2struct be_cmd_req_cq_createstruct be_cmd_resp_cq_createstruct be_cmd_req_get_fatstruct be_cmd_resp_get_fatstruct amap_mcc_context_bestruct amap_mcc_context_v1struct be_cmd_req_mcc_createstruct be_cmd_req_mcc_ext_createstruct be_cmd_resp_mcc_createstruct be_cmd_req_eth_tx_createstruct be_cmd_resp_eth_tx_createstruct be_cmd_req_eth_rx_createstruct be_cmd_resp_eth_rx_createstruct be_cmd_req_q_destroystruct be_cmd_req_if_createstruct be_cmd_resp_if_createstruct be_cmd_req_if_destroystruct be_port_rxf_stats_v0struct be_rxf_stats_v0struct be_erx_stats_v0struct be_pmem_statsstruct be_hw_stats_v0struct be_cmd_req_get_stats_v0
Annotated Snippet
struct be_sge {
u32 pa_lo;
u32 pa_hi;
u32 len;
};
#define MCC_WRB_EMBEDDED_MASK 1 /* bit 0 of dword 0*/
#define MCC_WRB_SGE_CNT_SHIFT 3 /* bits 3 - 7 of dword 0 */
#define MCC_WRB_SGE_CNT_MASK 0x1F /* bits 3 - 7 of dword 0 */
struct be_mcc_wrb {
u32 embedded; /* dword 0 */
u32 payload_length; /* dword 1 */
u32 tag0; /* dword 2 */
u32 tag1; /* dword 3 */
u32 rsvd; /* dword 4 */
union {
u8 embedded_payload[236]; /* used by embedded cmds */
struct be_sge sgl[19]; /* used by non-embedded cmds */
} payload;
};
#define CQE_FLAGS_VALID_MASK BIT(31)
#define CQE_FLAGS_ASYNC_MASK BIT(30)
#define CQE_FLAGS_COMPLETED_MASK BIT(28)
#define CQE_FLAGS_CONSUMED_MASK BIT(27)
/* Completion Status */
enum mcc_base_status {
MCC_STATUS_SUCCESS = 0,
MCC_STATUS_FAILED = 1,
MCC_STATUS_ILLEGAL_REQUEST = 2,
MCC_STATUS_ILLEGAL_FIELD = 3,
MCC_STATUS_INSUFFICIENT_BUFFER = 4,
MCC_STATUS_UNAUTHORIZED_REQUEST = 5,
MCC_STATUS_NOT_SUPPORTED = 66,
MCC_STATUS_FEATURE_NOT_SUPPORTED = 68,
MCC_STATUS_INVALID_LENGTH = 116
};
/* Additional status */
enum mcc_addl_status {
MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES = 0x16,
MCC_ADDL_STATUS_FLASH_IMAGE_CRC_MISMATCH = 0x4d,
MCC_ADDL_STATUS_TOO_MANY_INTERFACES = 0x4a,
MCC_ADDL_STATUS_INSUFFICIENT_VLANS = 0xab,
MCC_ADDL_STATUS_INVALID_SIGNATURE = 0x56,
MCC_ADDL_STATUS_MISSING_SIGNATURE = 0x57,
MCC_ADDL_STATUS_INSUFFICIENT_PRIVILEGES = 0x60
};
#define CQE_BASE_STATUS_MASK 0xFFFF
#define CQE_BASE_STATUS_SHIFT 0 /* bits 0 - 15 */
#define CQE_ADDL_STATUS_MASK 0xFF
#define CQE_ADDL_STATUS_SHIFT 16 /* bits 16 - 31 */
#define base_status(status) \
((enum mcc_base_status) \
(status > 0 ? (status & CQE_BASE_STATUS_MASK) : 0))
#define addl_status(status) \
((enum mcc_addl_status) \
(status > 0 ? (status >> CQE_ADDL_STATUS_SHIFT) & \
CQE_ADDL_STATUS_MASK : 0))
struct be_mcc_compl {
u32 status; /* dword 0 */
u32 tag0; /* dword 1 */
u32 tag1; /* dword 2 */
u32 flags; /* dword 3 */
};
/* When the async bit of mcc_compl flags is set, flags
* is interpreted as follows:
*/
#define ASYNC_EVENT_CODE_SHIFT 8 /* bits 8 - 15 */
#define ASYNC_EVENT_CODE_MASK 0xFF
#define ASYNC_EVENT_TYPE_SHIFT 16
#define ASYNC_EVENT_TYPE_MASK 0xFF
#define ASYNC_EVENT_CODE_LINK_STATE 0x1
#define ASYNC_EVENT_CODE_GRP_5 0x5
#define ASYNC_EVENT_QOS_SPEED 0x1
#define ASYNC_EVENT_COS_PRIORITY 0x2
#define ASYNC_EVENT_PVID_STATE 0x3
#define ASYNC_EVENT_CODE_QNQ 0x6
#define ASYNC_DEBUG_EVENT_TYPE_QNQ 1
#define ASYNC_EVENT_CODE_SLIPORT 0x11
#define ASYNC_EVENT_PORT_MISCONFIG 0x9
#define ASYNC_EVENT_FW_CONTROL 0x5
enum {
LINK_DOWN = 0x0,
Annotation
- Detected declarations: `struct be_sge`, `struct be_mcc_wrb`, `struct be_mcc_compl`, `struct be_async_event_link_state`, `struct be_async_event_grp5_qos_link_speed`, `struct be_async_event_grp5_cos_priority`, `struct be_async_event_grp5_pvid_state`, `struct be_async_event_qnq`, `struct be_async_event_misconfig_port`, `struct be_async_fw_control`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.