drivers/net/ipa/gsi_private.h
Source file repositories/reference/linux-study-clean/drivers/net/ipa/gsi_private.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ipa/gsi_private.h- Extension
.h- Size
- 4095 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/types.h
Detected Declarations
struct gsistruct gsi_channelstruct gsi_ringstruct gsi_trans
Annotated Snippet
#ifndef _GSI_PRIVATE_H_
#define _GSI_PRIVATE_H_
/* === Only "gsi.c" and "gsi_trans.c" should include this file === */
#include <linux/types.h>
struct gsi;
struct gsi_channel;
struct gsi_ring;
struct gsi_trans;
#define GSI_RING_ELEMENT_SIZE 16 /* bytes; must be a power of 2 */
/**
* gsi_trans_move_complete() - Mark a GSI transaction completed
* @trans: Transaction whose state is to be updated
*/
void gsi_trans_move_complete(struct gsi_trans *trans);
/**
* gsi_trans_move_polled() - Mark a transaction polled
* @trans: Transaction whose state is to be updated
*/
void gsi_trans_move_polled(struct gsi_trans *trans);
/**
* gsi_trans_complete() - Complete a GSI transaction
* @trans: Transaction to complete
*
* Marks a transaction complete (including freeing it).
*/
void gsi_trans_complete(struct gsi_trans *trans);
/**
* gsi_channel_trans_mapped() - Return a transaction mapped to a TRE index
* @channel: Channel associated with the transaction
* @index: Index of the TRE having a transaction
*
* Return: The GSI transaction pointer associated with the TRE index
*/
struct gsi_trans *gsi_channel_trans_mapped(struct gsi_channel *channel,
u32 index);
/**
* gsi_channel_trans_complete() - Return a channel's next completed transaction
* @channel: Channel whose next transaction is to be returned
*
* Return: The next completed transaction, or NULL if nothing new
*/
struct gsi_trans *gsi_channel_trans_complete(struct gsi_channel *channel);
/**
* gsi_channel_trans_cancel_pending() - Cancel pending transactions
* @channel: Channel whose pending transactions should be cancelled
*
* Cancel all pending transactions on a channel. These are transactions
* that have been committed but not yet completed. This is required when
* the channel gets reset. At that time all pending transactions will be
* marked as cancelled.
*
* NOTE: Transactions already complete at the time of this call are
* unaffected.
*/
void gsi_channel_trans_cancel_pending(struct gsi_channel *channel);
/**
* gsi_channel_trans_init() - Initialize a channel's GSI transaction info
* @gsi: GSI pointer
* @channel_id: Channel number
*
* Return: 0 if successful, or -ENOMEM on allocation failure
*
* Creates and sets up information for managing transactions on a channel
*/
int gsi_channel_trans_init(struct gsi *gsi, u32 channel_id);
/**
* gsi_channel_trans_exit() - Inverse of gsi_channel_trans_init()
* @channel: Channel whose transaction information is to be cleaned up
*/
void gsi_channel_trans_exit(struct gsi_channel *channel);
/**
* gsi_channel_doorbell() - Ring a channel's doorbell
* @channel: Channel whose doorbell should be rung
*
* Rings a channel's doorbell to inform the GSI hardware that new
* transactions (TREs, really) are available for it to process.
*/
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct gsi`, `struct gsi_channel`, `struct gsi_ring`, `struct gsi_trans`.
- 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.