drivers/crypto/intel/qat/qat_common/adf_pfvf_vf_msg.c
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/adf_pfvf_vf_msg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/adf_pfvf_vf_msg.c- Extension
.c- Size
- 5241 bytes
- Lines
- 182
- Domain
- Driver Families
- Bucket
- drivers/crypto
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitfield.hadf_accel_devices.hadf_common_drv.hadf_pfvf_msg.hadf_pfvf_vf_msg.hadf_pfvf_vf_proto.h
Detected Declarations
function adf_vf2pf_notify_initfunction adf_vf2pf_notify_shutdownfunction adf_vf2pf_notify_restart_completefunction adf_vf2pf_request_versionfunction adf_vf2pf_get_capabilitiesfunction adf_vf2pf_get_ring_to_svcexport adf_vf2pf_notify_initexport adf_vf2pf_notify_shutdownexport adf_vf2pf_notify_restart_complete
Annotated Snippet
if (likely(len >= sizeof(struct capabilities_v1))) {
hw_data->extended_dc_capabilities = cap_msg.ext_dc_caps;
} else {
dev_err(&GET_DEV(accel_dev),
"Capabilities message truncated to %d bytes\n", len);
return -EFAULT;
}
}
return 0;
}
int adf_vf2pf_get_ring_to_svc(struct adf_accel_dev *accel_dev)
{
struct ring_to_svc_map_v1 rts_map_msg = { 0 };
unsigned int len = sizeof(rts_map_msg);
if (accel_dev->vf.pf_compat_ver < ADF_PFVF_COMPAT_RING_TO_SVC_MAP)
/* Use already set default mappings */
return 0;
if (adf_send_vf2pf_blkmsg_req(accel_dev, ADF_VF2PF_BLKMSG_REQ_RING_SVC_MAP,
(u8 *)&rts_map_msg, &len)) {
dev_err(&GET_DEV(accel_dev),
"QAT: Failed to get block message response\n");
return -EFAULT;
}
if (unlikely(len < sizeof(struct ring_to_svc_map_v1))) {
dev_err(&GET_DEV(accel_dev),
"RING_TO_SVC message truncated to %d bytes\n", len);
return -EFAULT;
}
/* Only v1 at present */
accel_dev->hw_device->ring_to_svc_map = rts_map_msg.map;
return 0;
}
Annotation
- Immediate include surface: `linux/bitfield.h`, `adf_accel_devices.h`, `adf_common_drv.h`, `adf_pfvf_msg.h`, `adf_pfvf_vf_msg.h`, `adf_pfvf_vf_proto.h`.
- Detected declarations: `function adf_vf2pf_notify_init`, `function adf_vf2pf_notify_shutdown`, `function adf_vf2pf_notify_restart_complete`, `function adf_vf2pf_request_version`, `function adf_vf2pf_get_capabilities`, `function adf_vf2pf_get_ring_to_svc`, `export adf_vf2pf_notify_init`, `export adf_vf2pf_notify_shutdown`, `export adf_vf2pf_notify_restart_complete`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: integration 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.