drivers/crypto/intel/qat/qat_common/adf_transport_internal.h
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/adf_transport_internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/adf_transport_internal.h- Extension
.h- Size
- 1807 bytes
- Lines
- 74
- Domain
- Driver Families
- Bucket
- drivers/crypto
- 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
linux/interrupt.hlinux/spinlock_types.hadf_transport.hlinux/debugfs.h
Detected Declarations
struct adf_etr_ring_debug_entrystruct adf_etr_ring_datastruct adf_etr_bank_datastruct adf_etr_datafunction adf_bank_debugfs_addfunction adf_ring_debugfs_add
Annotated Snippet
struct adf_etr_ring_debug_entry {
char ring_name[ADF_CFG_MAX_KEY_LEN_IN_BYTES];
struct dentry *debug;
};
struct adf_etr_ring_data {
void *base_addr;
atomic_t *inflights;
adf_callback_fn callback;
struct adf_etr_bank_data *bank;
dma_addr_t dma_addr;
struct adf_etr_ring_debug_entry *ring_debug;
spinlock_t lock; /* protects ring data struct */
u16 head;
u16 tail;
u32 threshold;
u8 ring_number;
u8 ring_size;
u8 msg_size;
};
struct adf_etr_bank_data {
struct adf_etr_ring_data *rings;
struct tasklet_struct resp_handler;
void __iomem *csr_addr;
u32 irq_coalesc_timer;
u32 bank_number;
u16 ring_mask;
u16 irq_mask;
spinlock_t lock; /* protects bank data struct */
struct adf_accel_dev *accel_dev;
struct dentry *bank_debug_dir;
struct dentry *bank_debug_cfg;
};
struct adf_etr_data {
struct adf_etr_bank_data *banks;
struct dentry *debug;
};
void adf_response_handler(uintptr_t bank_addr);
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
int adf_bank_debugfs_add(struct adf_etr_bank_data *bank);
void adf_bank_debugfs_rm(struct adf_etr_bank_data *bank);
int adf_ring_debugfs_add(struct adf_etr_ring_data *ring, const char *name);
void adf_ring_debugfs_rm(struct adf_etr_ring_data *ring);
#else
static inline int adf_bank_debugfs_add(struct adf_etr_bank_data *bank)
{
return 0;
}
#define adf_bank_debugfs_rm(bank) do {} while (0)
static inline int adf_ring_debugfs_add(struct adf_etr_ring_data *ring,
const char *name)
{
return 0;
}
#define adf_ring_debugfs_rm(ring) do {} while (0)
#endif
#endif
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/spinlock_types.h`, `adf_transport.h`, `linux/debugfs.h`.
- Detected declarations: `struct adf_etr_ring_debug_entry`, `struct adf_etr_ring_data`, `struct adf_etr_bank_data`, `struct adf_etr_data`, `function adf_bank_debugfs_add`, `function adf_ring_debugfs_add`.
- Atlas domain: Driver Families / drivers/crypto.
- 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.