drivers/net/ethernet/broadcom/asp2/bcmasp.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/broadcom/asp2/bcmasp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/broadcom/asp2/bcmasp.h- Extension
.h- Size
- 17160 bytes
- Lines
- 570
- 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/netdevice.hlinux/phy.hlinux/io-64-nonatomic-hi-lo.huapi/linux/ethtool.hnet/page_pool/helpers.h
Detected Declarations
struct bcmasp_tx_cbstruct bcmasp_resstruct bcmasp_descstruct bcmasp_intfstruct bcmasp_intf_stats64struct bcmasp_mib_countersstruct bcmasp_privstruct bcmasp_intfstruct bcmasp_net_filterstruct bcmasp_mda_filterstruct bcmasp_plat_datastruct bcmasp_privstruct bcmasp_pkt_offloadenum asp_rx_net_filter_block
Annotated Snippet
struct bcmasp_tx_cb {
struct sk_buff *skb;
unsigned int bytes_sent;
bool last;
DEFINE_DMA_UNMAP_ADDR(dma_addr);
DEFINE_DMA_UNMAP_LEN(dma_len);
};
struct bcmasp_res {
/* Per interface resources */
/* Port */
void __iomem *umac;
void __iomem *umac2fb;
void __iomem *rgmii;
/* TX slowpath/configuration */
void __iomem *tx_spb_ctrl;
void __iomem *tx_spb_top;
void __iomem *tx_epkt_core;
void __iomem *tx_pause_ctrl;
};
#define DESC_ADDR(x) ((x) & GENMASK_ULL(39, 0))
#define DESC_FLAGS(x) ((x) & GENMASK_ULL(63, 40))
struct bcmasp_desc {
u64 buf;
#define DESC_CHKSUM BIT_ULL(40)
#define DESC_CRC_ERR BIT_ULL(41)
#define DESC_RX_SYM_ERR BIT_ULL(42)
#define DESC_NO_OCT_ALN BIT_ULL(43)
#define DESC_PKT_TRUC BIT_ULL(44)
/* 39:0 (TX/RX) bits 0-39 of buf addr
* 40 (RX) checksum
* 41 (RX) crc_error
* 42 (RX) rx_symbol_error
* 43 (RX) non_octet_aligned
* 44 (RX) pkt_truncated
* 45 Reserved
* 56:46 (RX) mac_filter_id
* 60:57 (RX) rx_port_num (0-unicmac0, 1-unimac1)
* 61 Reserved
* 63:62 (TX) forward CRC, overwrite CRC
*/
u32 size;
u32 flags;
#define DESC_INT_EN BIT(0)
#define DESC_SOF BIT(1)
#define DESC_EOF BIT(2)
#define DESC_EPKT_CMD BIT(3)
#define DESC_SCRAM_ST BIT(8)
#define DESC_SCRAM_END BIT(9)
#define DESC_PCPP BIT(10)
#define DESC_PPPP BIT(11)
/* 0 (TX) tx_int_en
* 1 (TX/RX) SOF
* 2 (TX/RX) EOF
* 3 (TX) epkt_command
* 6:4 (TX) PA
* 7 (TX) pause at desc end
* 8 (TX) scram_start
* 9 (TX) scram_end
* 10 (TX) PCPP
* 11 (TX) PPPP
* 14:12 Reserved
* 15 (TX) pid ch Valid
* 19:16 (TX) data_pkt_type
* 32:20 (TX) pid_channel (RX) nw_filter_id
*/
};
struct bcmasp_intf;
struct bcmasp_intf_stats64 {
/* Rx Stats */
u64_stats_t rx_packets;
u64_stats_t rx_bytes;
u64_stats_t rx_errors;
u64_stats_t rx_dropped;
u64_stats_t rx_crc_errs;
u64_stats_t rx_sym_errs;
/* Tx Stats*/
u64_stats_t tx_packets;
u64_stats_t tx_bytes;
struct u64_stats_sync syncp;
};
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/phy.h`, `linux/io-64-nonatomic-hi-lo.h`, `uapi/linux/ethtool.h`, `net/page_pool/helpers.h`.
- Detected declarations: `struct bcmasp_tx_cb`, `struct bcmasp_res`, `struct bcmasp_desc`, `struct bcmasp_intf`, `struct bcmasp_intf_stats64`, `struct bcmasp_mib_counters`, `struct bcmasp_priv`, `struct bcmasp_intf`, `struct bcmasp_net_filter`, `struct bcmasp_mda_filter`.
- 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.