drivers/net/ethernet/cavium/liquidio/octeon_device.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/octeon_device.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/octeon_device.h- Extension
.h- Size
- 25009 bytes
- Lines
- 898
- 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.
- 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
linux/interrupt.hnet/devlink.h
Detected Declarations
struct octeon_dispatchstruct octeon_dispatch_liststruct octeon_mmiostruct octeon_io_enablestruct octeon_reg_liststruct octeon_consolestruct octeon_board_infostruct octeon_fn_liststruct cvmx_bootmem_named_block_descstruct oct_fw_infostruct cavium_wkstruct cavium_wqstruct octdev_propsstruct octeon_pf_vf_hs_wordstruct octeon_sriov_infostruct octeon_ioq_vectorstruct lio_vf_rep_liststruct lio_devlink_privstruct octeon_deviceenum octeon_pci_swap_modeenum lio_fw_statefunction lio_get_priv_flagfunction lio_set_priv_flag
Annotated Snippet
struct octeon_dispatch {
/** List head for this entry */
struct list_head list;
/** The opcode for which the dispatch function & arg should be used */
u16 opcode;
/** The function to be called for a packet received by the driver */
octeon_dispatch_fn_t dispatch_fn;
/* The application specified argument to be passed to the above
* function along with the received packet
*/
void *arg;
};
/** The dispatch list structure. */
struct octeon_dispatch_list {
/** access to dispatch list must be atomic */
spinlock_t lock;
/** Count of dispatch functions currently registered */
u32 count;
/** The list of dispatch functions */
struct octeon_dispatch *dlist;
};
/*----------------------- THE OCTEON DEVICE ---------------------------*/
#define OCT_MEM_REGIONS 3
/** PCI address space mapping information.
* Each of the 3 address spaces given by BAR0, BAR2 and BAR4 of
* Octeon gets mapped to different physical address spaces in
* the kernel.
*/
struct octeon_mmio {
/** PCI address to which the BAR is mapped. */
u64 start;
/** Length of this PCI address space. */
u32 len;
/** Length that has been mapped to phys. address space. */
u32 mapped_len;
/** The physical address to which the PCI address space is mapped. */
u8 __iomem *hw_addr;
/** Flag indicating the mapping was successful. */
u32 done;
};
#define MAX_OCTEON_MAPS 32
struct octeon_io_enable {
u64 iq;
u64 oq;
u64 iq64B;
};
struct octeon_reg_list {
u32 __iomem *pci_win_wr_addr_hi;
u32 __iomem *pci_win_wr_addr_lo;
u64 __iomem *pci_win_wr_addr;
u32 __iomem *pci_win_rd_addr_hi;
u32 __iomem *pci_win_rd_addr_lo;
u64 __iomem *pci_win_rd_addr;
u32 __iomem *pci_win_wr_data_hi;
u32 __iomem *pci_win_wr_data_lo;
u64 __iomem *pci_win_wr_data;
u32 __iomem *pci_win_rd_data_hi;
u32 __iomem *pci_win_rd_data_lo;
u64 __iomem *pci_win_rd_data;
};
#define OCTEON_CONSOLE_MAX_READ_BYTES 512
typedef int (*octeon_console_print_fn)(struct octeon_device *oct,
u32 num, char *pre, char *suf);
struct octeon_console {
u32 active;
u32 waiting;
u64 addr;
u32 buffer_size;
u64 input_base_addr;
u64 output_base_addr;
octeon_console_print_fn print;
Annotation
- Immediate include surface: `linux/interrupt.h`, `net/devlink.h`.
- Detected declarations: `struct octeon_dispatch`, `struct octeon_dispatch_list`, `struct octeon_mmio`, `struct octeon_io_enable`, `struct octeon_reg_list`, `struct octeon_console`, `struct octeon_board_info`, `struct octeon_fn_list`, `struct cvmx_bootmem_named_block_desc`, `struct oct_fw_info`.
- 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.
- 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.