drivers/net/ethernet/pensando/ionic/ionic_api.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/pensando/ionic/ionic_api.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/pensando/ionic/ionic_api.h- Extension
.h- Size
- 3896 bytes
- Lines
- 132
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/auxiliary_bus.hionic_if.hionic_regs.h
Detected Declarations
struct ionic_aux_devstruct ionic_admin_ctxstruct ionic_intr_info
Annotated Snippet
struct ionic_aux_dev {
struct ionic_lif *lif;
int idx;
struct auxiliary_device adev;
};
/**
* struct ionic_admin_ctx - Admin command context
* @work: Work completion wait queue element
* @cmd: Admin command (64B) to be copied to the queue
* @comp: Admin completion (16B) copied from the queue
*/
struct ionic_admin_ctx {
struct completion work;
union ionic_adminq_cmd cmd;
union ionic_adminq_comp comp;
};
#define IONIC_INTR_INDEX_NOT_ASSIGNED -1
#define IONIC_INTR_NAME_MAX_SZ 32
/**
* struct ionic_intr_info - Interrupt information
* @name: Name identifier
* @rearm_count: Interrupt rearm count
* @index: Interrupt index position
* @vector: Interrupt number
* @dim_coal_hw: Interrupt coalesce value in hardware units
* @affinity_mask: CPU affinity mask
* @aff_notify: context for notification of IRQ affinity changes
*/
struct ionic_intr_info {
char name[IONIC_INTR_NAME_MAX_SZ];
u64 rearm_count;
unsigned int index;
unsigned int vector;
u32 dim_coal_hw;
cpumask_var_t *affinity_mask;
struct irq_affinity_notify aff_notify;
};
/**
* ionic_adminq_post_wait - Post an admin command and wait for response
* @lif: Logical interface
* @ctx: API admin command context
*
* Post the command to an admin queue in the ethernet driver. If this command
* succeeds, then the command has been posted, but that does not indicate a
* completion. If this command returns success, then the completion callback
* will eventually be called.
*
* Return: zero or negative error status
*/
int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx);
/**
* ionic_error_to_errno - Transform ionic_if errors to os errno
* @code: Ionic error number
*
* Return: Negative OS error number or zero
*/
int ionic_error_to_errno(enum ionic_status_code code);
/**
* ionic_request_rdma_reset - request reset or disable the device or lif
* @lif: Logical interface
*
* The reset is triggered asynchronously. It will wait until reset request
* completes or times out.
*/
void ionic_request_rdma_reset(struct ionic_lif *lif);
/**
* ionic_intr_alloc - Reserve a device interrupt
* @lif: Logical interface
* @intr: Reserved ionic interrupt structure
*
* Reserve an interrupt index and get irq number for that index.
*
* Return: zero or negative error status
*/
int ionic_intr_alloc(struct ionic_lif *lif, struct ionic_intr_info *intr);
/**
* ionic_intr_free - Release a device interrupt index
* @lif: Logical interface
* @intr: Interrupt index
*
* Mark the interrupt index unused so that it can be reserved again.
*/
Annotation
- Immediate include surface: `linux/auxiliary_bus.h`, `ionic_if.h`, `ionic_regs.h`.
- Detected declarations: `struct ionic_aux_dev`, `struct ionic_admin_ctx`, `struct ionic_intr_info`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.