drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h- Extension
.h- Size
- 3198 bytes
- Lines
- 126
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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 octeon_mbox_cmdstruct octeon_mbox_cmdstruct octeon_mboxstruct oct_vf_stats_ctxenum octeon_mbox_cmd_statusenum octeon_mbox_message_typeenum octeon_mbox_state
Annotated Snippet
struct octeon_mbox_cmd {
union octeon_mbox_message msg;
u64 data[OCTEON_MBOX_DATA_MAX];
u32 q_no;
u32 recv_len;
u32 recv_status;
octeon_mbox_callback_t fn;
void *fn_arg;
};
enum octeon_mbox_state {
OCTEON_MBOX_STATE_IDLE = 1,
OCTEON_MBOX_STATE_REQUEST_RECEIVING = 2,
OCTEON_MBOX_STATE_REQUEST_RECEIVED = 4,
OCTEON_MBOX_STATE_RESPONSE_PENDING = 8,
OCTEON_MBOX_STATE_RESPONSE_RECEIVING = 16,
OCTEON_MBOX_STATE_RESPONSE_RECEIVED = 32,
OCTEON_MBOX_STATE_ERROR = 64
};
struct octeon_mbox {
/** A spinlock to protect access to this q_mbox. */
spinlock_t lock;
struct octeon_device *oct_dev;
u32 q_no;
enum octeon_mbox_state state;
struct cavium_wk mbox_poll_wk;
/** SLI_MAC_PF_MBOX_INT for PF, SLI_PKT_MBOX_INT for VF. */
void *mbox_int_reg;
/** SLI_PKT_PF_VF_MBOX_SIG(0) for PF, SLI_PKT_PF_VF_MBOX_SIG(1) for VF.
*/
void *mbox_write_reg;
/** SLI_PKT_PF_VF_MBOX_SIG(1) for PF, SLI_PKT_PF_VF_MBOX_SIG(0) for VF.
*/
void *mbox_read_reg;
struct octeon_mbox_cmd mbox_req;
struct octeon_mbox_cmd mbox_resp;
};
struct oct_vf_stats_ctx {
atomic_t status;
struct oct_vf_stats *stats;
};
int octeon_mbox_read(struct octeon_mbox *mbox);
int octeon_mbox_write(struct octeon_device *oct,
struct octeon_mbox_cmd *mbox_cmd);
int octeon_mbox_process_message(struct octeon_mbox *mbox);
int octeon_mbox_cancel(struct octeon_device *oct, int q_no);
#endif
Annotation
- Detected declarations: `struct octeon_mbox_cmd`, `struct octeon_mbox_cmd`, `struct octeon_mbox`, `struct oct_vf_stats_ctx`, `enum octeon_mbox_cmd_status`, `enum octeon_mbox_message_type`, `enum octeon_mbox_state`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.