Repository navigation
Description
Context
PR #44 landed the hisi_higmac driver — a minimal mainline port of the vendor's 3000-line higmac driver from Hi3516A_SDK_V1.0.8.0. The mainline version is 990 lines and intentionally stripped to the descriptor-ring TX/RX path that QEMU emulates and that real hardware needs to boot.
Sufficient for: ifup, DHCP, ping, SSH, web management.
Insufficient for: production camera traffic patterns (high-throughput RTSP streams, dropped-frame tracking, power management).
Missing vs. vendor driver
| Feature | Vendor (4.9 BSP) | Mainline hisi_higmac |
|---|---|---|
| TSO (TCP Segmentation Offload) | ✅ via TSO_COE_CTRL (0x02E8) + descriptor tso_* flags |
❌ |
| COE checksum offload | ✅ IPv4/IPv6 RX+TX checksum | ❌ |
| EEE / autoEEE | ✅ separate autoeee/ sub-driver, PHY-coordinated |
❌ |
| AVS (adaptive voltage scaling) | ✅ via open_pm.ko hooks |
❌ |
| Statistics / ndo_get_stats64 | ✅ HW counters | ❌ (only core netdev counters) |
| ethtool ops | ✅ link/speed/wol/coalesce/strings/stats | ❌ |
| Multicast hash filter | ✅ 128-bit MAC filter table | ❌ (runs permissive — broadcast + multicast pass) |
| PM suspend/resume | ✅ | ❌ (HW defaults across suspend) |
| WoL (Wake-on-LAN) | ✅ via PMU magic packet detect | ❌ |
| RX coalescing tuning | ✅ via RX_COALESCED_* regs |
❌ |
| VLAN HW offload | ✅ | ❌ |
Suggested phasing
Phase 1 — usability gaps
ndo_get_stats64: readRX_PKT_CNT,TX_PKT_CNT,RX_OCTET_CNT,TX_OCTET_CNT,RX_DROP_CNTfrom HW counters. Cheap, high-value for monitoring.ethtool_opswith at least:get_drvinfo,get_link,get_settings,get_strings,get_stats. Lets userspaceethtool eth0work.- Multicast hash filter: program the 128-bit table from
dev->mc.listso multicast users (IGMP, mDNS) don't all hit the slow path.
Phase 2 — performance
- TSO + COE checksum offload: vendor uses
TSO_COE_CTRLto enable IPv4/IPv6 TCP segmentation in HW. Significant win for RTSP/video streaming. - RX coalescing tuning: vendor defaults are
8 frames or 0x74(lineRX_COALESCED_FRAMES/RX_COALESCED_TIMER); make these ethtool-tunable.
Phase 3 — power
- PM suspend/resume: assert reset → restore on resume → reprogram ring base addresses, IRQ mask, port_en.
- EEE / autoEEE: significant complexity (vendor has a separate sub-driver); defer until phase 1/2 land.
- WoL + AVS: defer.
Why minimum-viable was the right scope for #44
Driver landed alongside hi3516av100_neo firmware bring-up (OpenIPC/firmware#2122). DoD was "QEMU boots + DHCP + ping" — bare-minimum meets that. Production hardening can layer on without changing the IP register layout assumptions. The driver also doesn't yet have real-hardware validation; phase 1 should arrive alongside the first hardware test of the av100_neo image.
Related
- openipc/linux arm: hisilicon: add hi3516av100 SoC support (CRG + DT + higmac driver) #44 (initial driver)
- OpenIPC/firmware #2122 (firmware build that exercises it)
- openhisilicon arm: dts: hi3518ev20x: enable uart1 so boards can mux it for PTZ #170, hi3516cv6xx: bsp-sfc: do not use quad #171 (V2A OSAL shim landings — orthogonal but same SoC bring-up effort)
Activity