[PATCH net-next v1 0/3] dinghai: firmware handshake, MSI-X interrupts and async event queue
From: han.junyang
Date: Sun Aug 23 2026 - 15:33:13 EST
From: Junyang Han <han.junyang@xxxxxxxxxx>
This series continues the DingHai PF driver bring-up on top of the
probe skeleton and the BAR/PCI capability access already merged in
net-next ("dinghai: add ZTE network driver support" and "dinghai:
add hardware register access and PCI capability scanning").
Patch 1 makes the probe talk to the firmware for the first time: it
waits for the version compatibility block to appear in BAR 0, checks
the driver/firmware version contract and then waits for the RISC-V
management core to finish booting, so later steps can talk to it.
Firmware images predating the protocol are detected and skipped.
Patch 2 allocates the fixed MSI-X vector layout of the device and
manages the vectors in per-purpose pools. IRQs are reference counted
so that several event queues can share one vector; delivery fans out
through an atomic notifier chain attached to each IRQ.
Patch 3 adds the event queue table and the first async event queue:
it takes one vector from the async pool, reads the event id from the
PF receive sub-channel of the BAR message area on interrupt and
dispatches it to the per-event-type notifier chains of the table.
Design note: struct zxdh_core_dev is shared by several core device
types (PF, VF, SF, MPF) whose IRQ pool and event queue layouts
differ, so the generic tables in the core only carry a private
pointer, and each device type keeps its concrete layout local to its
own source file. This series wires up the PF async part only; the
remaining pools and queues grow with the series that use them.
The BAR message channel handshake that tells the firmware which
vectors to signal, the vq queue pairs and the remaining event queues
follow in later series.
Junyang Han (3):
dinghai: add firmware version check and RISC-V readiness polling
dinghai: add MSI-X interrupt pools
dinghai: add async event queue for firmware notifications
drivers/net/ethernet/zte/dinghai/Makefile | 2 +-
drivers/net/ethernet/zte/dinghai/en_pf.c | 221 ++++++++++
drivers/net/ethernet/zte/dinghai/en_pf.h | 57 +++
drivers/net/ethernet/zte/dinghai/zxdh_eq.c | 145 +++++++
drivers/net/ethernet/zte/dinghai/zxdh_eq.h | 61 +++
drivers/net/ethernet/zte/dinghai/zxdh_irq.c | 424 ++++++++++++++++++++
drivers/net/ethernet/zte/dinghai/zxdh_irq.h | 71 ++++
7 files changed, 980 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/ethernet/zte/dinghai/zxdh_eq.c
create mode 100644 drivers/net/ethernet/zte/dinghai/zxdh_eq.h
create mode 100644 drivers/net/ethernet/zte/dinghai/zxdh_irq.c
create mode 100644 drivers/net/ethernet/zte/dinghai/zxdh_irq.h
--
2.27.0