The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v4 fwctl 0/3] fwctl/bnxt: DMA buffer support for HWRM commands
@ 2026-07-02  5:51 Pavan Chebbi
  2026-07-02  5:51 ` [PATCH v4 fwctl 1/3] fwctl: Add driver_data field to fwctl_rpc Pavan Chebbi
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Pavan Chebbi @ 2026-07-02  5:51 UTC (permalink / raw)
  To: jgg, michael.chan
  Cc: linux-kernel, dave.jiang, saeedm, jic23, gospo, selvin.xavier,
	leon, kalesh-anakkur.purayil, Pavan Chebbi

Several HWRM (HardWare Resource Manager) commands used for diagnostics,
firmware management, and NVM access carry one or more DMA address fields
in their input structures.  Until now these commands could not be issued
through the fwctl interface because the driver had no mechanism to safely
broker the host-side DMA buffers on userspace's behalf.

This series adds that mechanism in three steps.

In patch #1, the fwctl core UAPI adds a new driver_data field in struct
fwctl_rpc.  Drivers that need a driver_data payload receive the value and
are free to interpret it. Drivers that do not define one will reject any
non-zero value with -EOPNOTSUPP.  Existing mlx5 and pds fwctl drivers are
updated accordingly.

In patch #2, the bnxt HSI header is updated to add the missing struct
definitions for the HWRM commands that the bnxt fwctl driver will support.

In patch #3, the bnxt fwctl driver consumes driver_data as a pointer to
a new bnxt UAPI struct fwctl_bnxt_driver_data, which describes indirect
DMA buffers.

v4: Collected Rb tag from Dave for patch #1. Thanks Dave

v3: In patch #3, remove include of linux/sizes.h from UAPI header bnxt.h

v2: In patch #1, update all the drivers that implement fw_rpc to check
driver_data. In patch #2, add another HWRM command that I had missed in v1.
In patch #3, update the allow-list and timeout tables for the additional
commands.

Pavan Chebbi (3):
  fwctl: Add driver_data field to fwctl_rpc
  bnxt_en: Update bnxt firmware spec
  fwctl/bnxt: add DMA buffer support for HWRM commands

 drivers/cxl/core/features.c |   6 +-
 drivers/fwctl/bnxt/main.c   | 340 ++++++++++++++++++++-
 drivers/fwctl/main.c        |   3 +-
 drivers/fwctl/mlx5/main.c   |   6 +-
 drivers/fwctl/pds/main.c    |   6 +-
 include/linux/bnxt/hsi.h    | 585 ++++++++++++++++++++++++++++++++++++
 include/linux/fwctl.h       |   8 +-
 include/uapi/fwctl/bnxt.h   |  37 +++
 include/uapi/fwctl/fwctl.h  |   3 +
 9 files changed, 986 insertions(+), 8 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-04  6:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  5:51 [PATCH v4 fwctl 0/3] fwctl/bnxt: DMA buffer support for HWRM commands Pavan Chebbi
2026-07-02  5:51 ` [PATCH v4 fwctl 1/3] fwctl: Add driver_data field to fwctl_rpc Pavan Chebbi
2026-07-02  5:51 ` [PATCH v4 fwctl 2/3] bnxt_en: Update bnxt firmware spec Pavan Chebbi
2026-07-02  5:51 ` [PATCH v4 fwctl 3/3] fwctl/bnxt: add DMA buffer support for HWRM commands Pavan Chebbi
2026-07-03 17:51 ` [PATCH v4 fwctl 0/3] fwctl/bnxt: " Jason Gunthorpe
2026-07-04  6:04   ` Pavan Chebbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox