drivers/net/ipa/ipa_gsi.c
Source file repositories/reference/linux-study-clean/drivers/net/ipa/ipa_gsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ipa/ipa_gsi.c- Extension
.c- Size
- 1537 bytes
- Lines
- 57
- 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.hgsi_trans.hipa.hipa_data.hipa_endpoint.hipa_gsi.hipa_version.h
Detected Declarations
function Copyrightfunction ipa_gsi_trans_releasefunction ipa_gsi_channel_tx_queuedfunction ipa_gsi_channel_tx_completedfunction ipa_gsi_endpoint_data_empty
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
* Copyright (C) 2019-2024 Linaro Ltd.
*/
#include <linux/types.h>
#include "gsi_trans.h"
#include "ipa.h"
#include "ipa_data.h"
#include "ipa_endpoint.h"
#include "ipa_gsi.h"
#include "ipa_version.h"
void ipa_gsi_trans_complete(struct gsi_trans *trans)
{
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
ipa_endpoint_trans_complete(ipa->channel_map[trans->channel_id], trans);
}
void ipa_gsi_trans_release(struct gsi_trans *trans)
{
struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi);
ipa_endpoint_trans_release(ipa->channel_map[trans->channel_id], trans);
}
void ipa_gsi_channel_tx_queued(struct gsi *gsi, u32 channel_id, u32 count,
u32 byte_count)
{
struct ipa *ipa = container_of(gsi, struct ipa, gsi);
struct ipa_endpoint *endpoint;
endpoint = ipa->channel_map[channel_id];
if (endpoint->netdev)
netdev_sent_queue(endpoint->netdev, byte_count);
}
void ipa_gsi_channel_tx_completed(struct gsi *gsi, u32 channel_id, u32 count,
u32 byte_count)
{
struct ipa *ipa = container_of(gsi, struct ipa, gsi);
struct ipa_endpoint *endpoint;
endpoint = ipa->channel_map[channel_id];
if (endpoint->netdev)
netdev_completed_queue(endpoint->netdev, count, byte_count);
}
/* Indicate whether an endpoint config data entry is "empty" */
bool ipa_gsi_endpoint_data_empty(const struct ipa_gsi_endpoint_data *data)
{
return data->ee_id == GSI_EE_AP && !data->channel.tlv_count;
}
Annotation
- Immediate include surface: `linux/types.h`, `gsi_trans.h`, `ipa.h`, `ipa_data.h`, `ipa_endpoint.h`, `ipa_gsi.h`, `ipa_version.h`.
- Detected declarations: `function Copyright`, `function ipa_gsi_trans_release`, `function ipa_gsi_channel_tx_queued`, `function ipa_gsi_channel_tx_completed`, `function ipa_gsi_endpoint_data_empty`.
- 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.