drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c- Extension
.c- Size
- 13137 bytes
- Lines
- 520
- 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/bitops.hlinux/export.hlinux/io.hlinux/netdevice.hlinux/phy.hsxgbe_common.hsxgbe_dma.hsxgbe_desc.h
Detected Declarations
function Copyrightfunction sxgbe_tx_desc_enable_tsefunction sxgbe_prepare_tx_descfunction sxgbe_tx_vlanctl_descfunction sxgbe_set_tx_ownerfunction sxgbe_get_tx_ownerfunction sxgbe_close_tx_descfunction sxgbe_release_tx_descfunction sxgbe_clear_tx_icfunction sxgbe_get_tx_lsfunction sxgbe_get_tx_lenfunction sxgbe_tx_enable_tstampfunction sxgbe_get_tx_timestamp_statusfunction sxgbe_tx_ctxt_desc_set_ctxtfunction sxgbe_tx_ctxt_desc_set_ownerfunction sxgbe_tx_ctxt_desc_get_ownerfunction sxgbe_tx_ctxt_desc_set_mssfunction sxgbe_tx_ctxt_desc_get_mssfunction sxgbe_tx_ctxt_desc_set_tcmssvfunction sxgbe_tx_ctxt_desc_reset_ostcfunction sxgbe_tx_ctxt_desc_set_ivlantagfunction sxgbe_tx_ctxt_desc_get_ivlantagfunction sxgbe_tx_ctxt_desc_set_vlantagfunction sxgbe_tx_ctxt_desc_get_vlantagfunction sxgbe_tx_ctxt_desc_set_tstampfunction sxgbe_tx_ctxt_desc_closefunction sxgbe_tx_ctxt_desc_get_cdefunction sxgbe_init_rx_descfunction sxgbe_get_rx_ownerfunction sxgbe_set_rx_ownerfunction sxgbe_set_rx_int_on_comfunction sxgbe_get_rx_frame_lenfunction sxgbe_get_rx_fd_statusfunction sxgbe_get_rx_ld_statusfunction sxgbe_rx_wbstatusfunction sxgbe_get_rx_ctxt_ownerfunction sxgbe_set_ctxt_rx_ownerfunction sxgbe_rx_ctxt_wbstatusfunction sxgbe_get_rx_ctxt_tstamp_statusfunction sxgbe_get_rx_timestamp
Annotated Snippet
switch (p->rdes23.rx_wb_des23.err_l2_type) {
case RX_GMII_ERR:
status = -EINVAL;
x->rx_code_gmii_err++;
break;
case RX_WATCHDOG_ERR:
status = -EINVAL;
x->rx_watchdog_err++;
break;
case RX_CRC_ERR:
status = -EINVAL;
x->rx_crc_err++;
break;
case RX_GAINT_ERR:
status = -EINVAL;
x->rx_gaint_pkt_err++;
break;
case RX_IP_HDR_ERR:
*checksum = CHECKSUM_NONE;
x->ip_hdr_err++;
break;
case RX_PAYLOAD_ERR:
*checksum = CHECKSUM_NONE;
x->ip_payload_err++;
break;
case RX_OVERFLOW_ERR:
status = -EINVAL;
x->overflow_error++;
break;
default:
pr_err("Invalid Error type\n");
break;
}
} else {
switch (p->rdes23.rx_wb_des23.err_l2_type) {
case RX_LEN_PKT:
x->len_pkt++;
break;
case RX_MACCTL_PKT:
x->mac_ctl_pkt++;
break;
case RX_DCBCTL_PKT:
x->dcb_ctl_pkt++;
break;
case RX_ARP_PKT:
x->arp_pkt++;
break;
case RX_OAM_PKT:
x->oam_pkt++;
break;
case RX_UNTAG_PKT:
x->untag_okt++;
break;
case RX_OTHER_PKT:
x->other_pkt++;
break;
case RX_SVLAN_PKT:
x->svlan_tag_pkt++;
break;
case RX_CVLAN_PKT:
x->cvlan_tag_pkt++;
break;
case RX_DVLAN_OCVLAN_ICVLAN_PKT:
x->dvlan_ocvlan_icvlan_pkt++;
break;
case RX_DVLAN_OSVLAN_ISVLAN_PKT:
x->dvlan_osvlan_isvlan_pkt++;
break;
case RX_DVLAN_OSVLAN_ICVLAN_PKT:
x->dvlan_osvlan_icvlan_pkt++;
break;
case RX_DVLAN_OCVLAN_ISVLAN_PKT:
x->dvlan_ocvlan_icvlan_pkt++;
break;
default:
pr_err("Invalid L2 Packet type\n");
break;
}
}
/* L3/L4 Pkt type */
switch (p->rdes23.rx_wb_des23.layer34_pkt_type) {
case RX_NOT_IP_PKT:
x->not_ip_pkt++;
break;
case RX_IPV4_TCP_PKT:
x->ip4_tcp_pkt++;
break;
case RX_IPV4_UDP_PKT:
x->ip4_udp_pkt++;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/export.h`, `linux/io.h`, `linux/netdevice.h`, `linux/phy.h`, `sxgbe_common.h`, `sxgbe_dma.h`, `sxgbe_desc.h`.
- Detected declarations: `function Copyright`, `function sxgbe_tx_desc_enable_tse`, `function sxgbe_prepare_tx_desc`, `function sxgbe_tx_vlanctl_desc`, `function sxgbe_set_tx_owner`, `function sxgbe_get_tx_owner`, `function sxgbe_close_tx_desc`, `function sxgbe_release_tx_desc`, `function sxgbe_clear_tx_ic`, `function sxgbe_get_tx_ls`.
- 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.