[PATCH net-next v1 0/3] dinghai: firmware handshake, MSI-X interrupts and async event queue

han.junyang@zte.com.cn posted 3 patches 1 month ago
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
[PATCH net-next v1 0/3] dinghai: firmware handshake, MSI-X interrupts and async event queue
Posted by han.junyang@zte.com.cn 1 month ago
From: Junyang Han <han.junyang@zte.com.cn>

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
Re: [PATCH net-next v1 0/3] dinghai: firmware handshake, MSI-X interrupts and async event queue
Posted by Jakub Kicinski 1 month ago
On Mon, 24 Aug 2026 03:32:49 +0800 (CST) han.junyang@zte.com.cn wrote:
> Subject: [PATCH net-next v1 0/3] dinghai: firmware handshake, MSI-X interrupts and async event queue

## Form letter - net-next-closed

net-next pull request for v7.3 has already been merged, and therefore
the net-next tree is closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens after Aug 31st.

RFC patches sent for review only are obviously welcome at any time.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
-- 
pw-bot: defer
pv-bot: closed