drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c- Extension
.c- Size
- 15828 bytes
- Lines
- 557
- 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
hw_atl2_llh.hhw_atl2_llh_internal.haq_hw_utils.h
Detected Declarations
function Copyrightfunction hw_atl2_rpf_redirection_table2_select_setfunction hw_atl2_rpf_rss_hash_type_setfunction hw_atl2_rpf_new_enable_setfunction hw_atl2_rpfl2_uc_flr_tag_setfunction hw_atl2_rpfl2_bc_flr_tag_setfunction hw_atl2_new_rpf_rss_redir_setfunction hw_atl2_rpf_vlan_flr_tag_setfunction hw_atl2_rpf_etht_flr_tag_setfunction hw_atl2_rpf_etht_flr_tag_getfunction hw_atl2_rpf_l3_v4_dest_addr_setfunction hw_atl2_rpf_l3_v4_src_addr_setfunction hw_atl2_rpf_l3_v6_dest_addr_setfunction hw_atl2_rpf_l3_v6_src_addr_setfunction hw_atl2_rpf_l3_v4_cmd_setfunction hw_atl2_rpf_l3_v6_cmd_setfunction hw_atl2_rpf_l3_v6_v4_select_setfunction hw_atl2_rpf_l3_v4_tag_setfunction hw_atl2_rpf_l3_v6_tag_setfunction hw_atl2_rpf_l4_tag_setfunction hw_atl2_rpf_l4_cmd_setfunction hw_atl2_clock_modif_value_setfunction hw_atl2_tsg_clock_enfunction hw_atl2_tsg_clock_resetfunction hw_atl2_tsg_clock_readfunction hw_atl2_tsg_clock_addfunction hw_atl2_tsg_clock_subfunction hw_atl2_tsg_clock_increment_setfunction hw_atl2_tpb_tps_highest_priority_tc_enable_setfunction hw_atl2_tpb_tps_highest_priority_tc_setfunction hw_atl2_tsg_gpio_isr_to_host_setfunction hw_atl2_tsg_gpio_clear_statusfunction hw_atl2_tsg_gpio_input_event_info_getfunction hw_atl2_tsg_ptp_gpio_gen_pulsefunction hw_atl2_rpf_rx_desc_timestamp_req_setfunction hw_atl2_tpb_tx_tc_q_rand_map_en_setfunction hw_atl2_tpb_tx_buf_clk_gate_en_setfunction hw_atl2_reg_tx_intr_moder_ctrl_setfunction hw_atl2_tdm_tx_desc_timestamp_writeback_en_setfunction hw_atl2_tdm_tx_desc_timestamp_en_setfunction hw_atl2_tdm_tx_desc_avb_en_setfunction hw_atl2_tps_tx_pkt_shed_data_arb_mode_setfunction hw_atl2_tps_tx_pkt_shed_tc_data_max_credit_setfunction hw_atl2_tps_tx_pkt_shed_tc_data_weight_setfunction hw_atl2_tdm_tx_data_read_req_limit_setfunction hw_atl2_tdm_tx_desc_read_req_limit_setfunction hw_atl2_get_hw_versionfunction hw_atl2_init_launchtime
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/* Atlantic Network Driver
* Copyright (C) 2020 Marvell International Ltd.
*/
#include "hw_atl2_llh.h"
#include "hw_atl2_llh_internal.h"
#include "aq_hw_utils.h"
u32 hw_atl2_phi_ext_tag_get(struct aq_hw_s *aq_hw)
{
return aq_hw_read_reg_bit(aq_hw, HW_ATL2_PHI_EXT_TAG_EN_ADR,
HW_ATL2_PHI_EXT_TAG_EN_MSK,
HW_ATL2_PHI_EXT_TAG_EN_SHIFT);
}
void hw_atl2_rpf_redirection_table2_select_set(struct aq_hw_s *aq_hw,
u32 select)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_PIF_RPF_REDIR2_ENI_ADR,
HW_ATL2_RPF_PIF_RPF_REDIR2_ENI_MSK,
HW_ATL2_RPF_PIF_RPF_REDIR2_ENI_SHIFT, select);
}
void hw_atl2_rpf_rss_hash_type_set(struct aq_hw_s *aq_hw, u32 rss_hash_type)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_PIF_RPF_RSS_HASH_TYPEI_ADR,
HW_ATL2_RPF_PIF_RPF_RSS_HASH_TYPEI_MSK,
HW_ATL2_RPF_PIF_RPF_RSS_HASH_TYPEI_SHIFT,
rss_hash_type);
}
/* rpf */
void hw_atl2_rpf_new_enable_set(struct aq_hw_s *aq_hw, u32 enable)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_NEW_EN_ADR,
HW_ATL2_RPF_NEW_EN_MSK,
HW_ATL2_RPF_NEW_EN_SHIFT,
enable);
}
void hw_atl2_rpfl2_uc_flr_tag_set(struct aq_hw_s *aq_hw, u32 tag, u32 filter)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPFL2UC_TAG_ADR(filter),
HW_ATL2_RPFL2UC_TAG_MSK,
HW_ATL2_RPFL2UC_TAG_SHIFT,
tag);
}
void hw_atl2_rpfl2_bc_flr_tag_set(struct aq_hw_s *aq_hw, u32 tag)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_L2_BC_TAG_ADR,
HW_ATL2_RPF_L2_BC_TAG_MSK,
HW_ATL2_RPF_L2_BC_TAG_SHIFT,
tag);
}
void hw_atl2_new_rpf_rss_redir_set(struct aq_hw_s *aq_hw, u32 tc, u32 index,
u32 queue)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_RSS_REDIR_ADR(tc, index),
HW_ATL2_RPF_RSS_REDIR_MSK(tc),
HW_ATL2_RPF_RSS_REDIR_SHIFT(tc),
queue);
}
void hw_atl2_rpf_vlan_flr_tag_set(struct aq_hw_s *aq_hw, u32 tag, u32 filter)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_VL_TAG_ADR(filter),
HW_ATL2_RPF_VL_TAG_MSK,
HW_ATL2_RPF_VL_TAG_SHIFT,
tag);
}
void hw_atl2_rpf_etht_flr_tag_set(struct aq_hw_s *aq_hw, u32 tag, u32 filter)
{
aq_hw_write_reg_bit(aq_hw, HW_ATL2_RPF_ET_TAG_ADR(filter),
HW_ATL2_RPF_ET_TAG_MSK,
HW_ATL2_RPF_ET_TAG_SHIFT, tag);
}
u32 hw_atl2_rpf_etht_flr_tag_get(struct aq_hw_s *aq_hw, u32 filter)
{
return aq_hw_read_reg_bit(aq_hw, HW_ATL2_RPF_ET_TAG_ADR(filter),
HW_ATL2_RPF_ET_TAG_MSK,
HW_ATL2_RPF_ET_TAG_SHIFT);
}
void hw_atl2_rpf_l3_v4_dest_addr_set(struct aq_hw_s *aq_hw, u32 filter, u32 val)
Annotation
- Immediate include surface: `hw_atl2_llh.h`, `hw_atl2_llh_internal.h`, `aq_hw_utils.h`.
- Detected declarations: `function Copyright`, `function hw_atl2_rpf_redirection_table2_select_set`, `function hw_atl2_rpf_rss_hash_type_set`, `function hw_atl2_rpf_new_enable_set`, `function hw_atl2_rpfl2_uc_flr_tag_set`, `function hw_atl2_rpfl2_bc_flr_tag_set`, `function hw_atl2_new_rpf_rss_redir_set`, `function hw_atl2_rpf_vlan_flr_tag_set`, `function hw_atl2_rpf_etht_flr_tag_set`, `function hw_atl2_rpf_etht_flr_tag_get`.
- 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.