How tc956x/tc9564_host_driver works
This is a Linux PCIe Ethernet host driver for Toshiba’s TC956X, exposing a network interface and driver controls to the kernel and administrator. The main workflow is PCI device discovery and setup, MAC/DMA initialization, then packet transmission and reception through the kernel network stack; link management and optional offload, timestamping, and diagnostics are supporting capabilities. The sampled excerpts are partial, so some subsystem connections are omitted or marked unverified rather than inferred as definite calls.
Main entry points: tc956xmac_main.c MAC driver · hwif.c Hardware dispatch · tc956x_pci.c PCI setup · dwxgmac2_core.c MAC register operations
Components 19
Device entry
- PCI setup
tc956x_pci.c - MAC driver
tc956xmac_main.c
Ethernet datapath
- MAC register operations
dwxgmac2_core.c - Descriptor handling
dwxgmac2_descs.c - DMA operations
dwxgmac2_dma.c - Hardware dispatch
hwif.c - Hardware statistics
mmc_core.c
Link and timing
- MDIO management
tc956xmac_mdio.c - PCS link
tc956x_xpcs.c - PMA access
tc956x_pma.c - PTP timestamping
tc956xmac_ptp.c - Timestamp configuration
tc956xmac_hwtstamp.c
Controls and diagnostics
- Ettool controls
tc956xmac_ethtool.c - Traffic control
tc956xmac_tc.c - Driver controls
tc956x_ipa_intf.c - PCIe diagnostics
tc956x_pcie_logstat.c
Other components
- Driver administrator
- Linux network stack
- PCIe device
Connections 18
- Driver administrator → PCI setup: loads driver
Readme.md - PCIe device → PCI setup: probes
- PCI setup → MAC driver: initializes
- Linux network stack → MAC driver: sends packets
- MAC driver → Hardware dispatch: uses callbacks
- Hardware dispatch → MAC register operations: dispatches
- Hardware dispatch → Descriptor handling: dispatches
- Hardware dispatch → DMA operations: dispatches
- MAC driver → Hardware statistics: reads counters
- Linux network stack → Ettool controls: requests settings
- Linux network stack → Traffic control: configures traffic
- Driver administrator → Driver controls: sets controls
- MAC driver → MDIO management: manages PHY
- MAC driver → PCS link: reads link state
tc956xmac_main.c - MAC driver → PMA access: accesses PMA
- MAC driver → PTP timestamping: uses PTP
tc956xmac_main.c - MAC driver → Timestamp configuration: configures timestamps
- Driver administrator → PCIe diagnostics: reads diagnostics