drivers/net/ethernet/cavium/liquidio/octeon_nic.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/octeon_nic.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/octeon_nic.c- Extension
.c- Size
- 5597 bytes
- Lines
- 202
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
linux/pci.hlinux/netdevice.hliquidio_common.hocteon_droq.hocteon_iq.hresponse_manager.hocteon_device.hocteon_nic.hocteon_main.h
Detected Declarations
function octeon_alloc_soft_command_respfunction octnet_send_nic_data_pktfunction octnet_send_nic_ctrl_pktexport octeon_alloc_soft_command_respexport octnet_send_nic_data_pktexport octnet_send_nic_ctrl_pkt
Annotated Snippet
switch (nctrl->ncmd.s.cmd) {
/* caller holds lock, can not sleep */
case OCTNET_CMD_CHANGE_DEVFLAGS:
case OCTNET_CMD_SET_MULTI_LIST:
case OCTNET_CMD_SET_UC_LIST:
WRITE_ONCE(sc->caller_is_done, true);
return retval;
}
}
retval = wait_for_sc_completion_timeout(oct, sc, 0);
if (retval)
return (retval);
nctrl->sc_status = sc->sc_status;
retval = nctrl->sc_status;
if (nctrl->cb_fn)
nctrl->cb_fn(nctrl);
WRITE_ONCE(sc->caller_is_done, true);
return retval;
}
EXPORT_SYMBOL_GPL(octnet_send_nic_ctrl_pkt);
Annotation
- Immediate include surface: `linux/pci.h`, `linux/netdevice.h`, `liquidio_common.h`, `octeon_droq.h`, `octeon_iq.h`, `response_manager.h`, `octeon_device.h`, `octeon_nic.h`.
- Detected declarations: `function octeon_alloc_soft_command_resp`, `function octnet_send_nic_data_pkt`, `function octnet_send_nic_ctrl_pkt`, `export octeon_alloc_soft_command_resp`, `export octnet_send_nic_data_pkt`, `export octnet_send_nic_ctrl_pkt`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.