drivers/net/ipa/ipa_main.c
Source file repositories/reference/linux-study-clean/drivers/net/ipa/ipa_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ipa/ipa_main.c- Extension
.c- Size
- 28601 bytes
- Lines
- 1024
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bug.hlinux/firmware.hlinux/io.hlinux/module.hlinux/of.hlinux/of_reserved_mem.hlinux/platform_device.hlinux/pm_runtime.hlinux/types.hlinux/firmware/qcom/qcom_scm.hlinux/soc/qcom/mdt_loader.hipa.hipa_cmd.hipa_data.hipa_endpoint.hipa_interrupt.hipa_mem.hipa_modem.hipa_power.hipa_reg.hipa_resource.hipa_smp2p.hipa_sysfs.hipa_table.hipa_uc.hipa_version.h
Detected Declarations
enum ipa_firmware_loaderfunction ipa_setupfunction ipa_teardownfunction ipa_hardware_config_bcrfunction ipa_hardware_config_txfunction ipa_hardware_config_clkonfunction ipa_hardware_config_compfunction ipa_hardware_config_qsbfunction valuefunction timestampsfunction ipa_hardware_config_counterfunction ipa_hardware_config_timingfunction ipa_hardware_config_hashingfunction ipa_idle_indication_cfgfunction ipa_hardware_dcd_configfunction ipa_hardware_dcd_deconfigfunction ipa_hardware_configfunction ipa_hardware_deconfigfunction ipa_configfunction ipa_deconfigfunction ipa_firmware_loadfunction BUILD_BUG_ONfunction ipa_firmware_loaderfunction ipa_probefunction ipa_remove
Annotated Snippet
if (ret == -EBUSY) {
usleep_range(USEC_PER_MSEC, 2 * USEC_PER_MSEC);
ret = ipa_modem_stop(ipa);
}
if (ret) {
/*
* Not cleaning up here properly might also yield a
* crash later on. As the device is still unregistered
* in this case, this might even yield a crash later on.
*/
dev_err(dev, "Failed to stop modem (%pe), leaking resources\n",
ERR_PTR(ret));
return;
}
ipa_teardown(ipa);
}
ipa_deconfig(ipa);
out_power_put:
pm_runtime_put_noidle(dev);
ipa_smp2p_exit(ipa);
ipa_table_exit(ipa);
ipa_endpoint_exit(ipa);
gsi_exit(&ipa->gsi);
ipa_mem_exit(ipa);
ipa_reg_exit(ipa);
kfree(ipa);
ipa_power_exit(power);
ipa_interrupt_exit(interrupt);
dev_info(dev, "IPA driver removed");
}
static const struct attribute_group *ipa_attribute_groups[] = {
&ipa_attribute_group,
&ipa_feature_attribute_group,
&ipa_endpoint_id_attribute_group,
&ipa_modem_attribute_group,
NULL,
};
static struct platform_driver ipa_driver = {
.probe = ipa_probe,
.remove = ipa_remove,
.shutdown = ipa_remove,
.driver = {
.name = "ipa",
.pm = &ipa_pm_ops,
.of_match_table = ipa_match,
.dev_groups = ipa_attribute_groups,
},
};
module_platform_driver(ipa_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Qualcomm IP Accelerator device driver");
Annotation
- Immediate include surface: `linux/bug.h`, `linux/firmware.h`, `linux/io.h`, `linux/module.h`, `linux/of.h`, `linux/of_reserved_mem.h`, `linux/platform_device.h`, `linux/pm_runtime.h`.
- Detected declarations: `enum ipa_firmware_loader`, `function ipa_setup`, `function ipa_teardown`, `function ipa_hardware_config_bcr`, `function ipa_hardware_config_tx`, `function ipa_hardware_config_clkon`, `function ipa_hardware_config_comp`, `function ipa_hardware_config_qsb`, `function value`, `function timestamps`.
- 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.