summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorPavan Chebbi <pavan.chebbi@broadcom.com>2026-08-07 18:28:46 +0530
committerJason Gunthorpe <jgg@nvidia.com>2026-08-07 14:18:13 -0300
commitee1c26323eeb01bca825d102cb7fff6921fa314f (patch)
tree2f7610d0c540a39a493aa5ce678921f6c41eda8d /include/uapi
parenta373934e2732909a457147cf0e036d7f54ad52eb (diff)
downloadlinux-ee1c26323eeb01bca825d102cb7fff6921fa314f.tar.gz
linux-ee1c26323eeb01bca825d102cb7fff6921fa314f.zip
fwctl/bnxt: Add DMA buffer support for HWRM commands
Several HWRM commands carry __le64 DMA address fields in their input structures; firmware reads from or writes to the memory those addresses point to. Have a static per-command descriptor table in the driver that records the details of the DMA fields in each supported HWRM input struct. When a DMA-bearing HWRM command arrives, the driver reads the userspace pointer out of each declared address field and clears the field, allocates a DMA-coherent kernel buffer sized from the command's own length information, copies data to/from the userspace pointer, and patches the field with the real DMA bus address before the command is sent to firmware. Responses are copied back to the original userspace pointer afterward. Scope-gated allow-list and timeout value list are updated with the new the commands. Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://patch.msgid.link/20260807125846.45570-3-pavan.chebbi@broadcom.com Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/fwctl/bnxt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/fwctl/bnxt.h b/include/uapi/fwctl/bnxt.h
index 32e0bfb9a836..398c1ad0cc0a 100644
--- a/include/uapi/fwctl/bnxt.h
+++ b/include/uapi/fwctl/bnxt.h
@@ -12,6 +12,7 @@ enum fwctl_bnxt_commands {
FWCTL_BNXT_INLINE_COMMANDS = 0,
FWCTL_BNXT_QUERY_COMMANDS,
FWCTL_BNXT_SEND_COMMANDS,
+ FWCTL_BNXT_DMA_COMMANDS,
};
/**
@@ -23,4 +24,7 @@ enum fwctl_bnxt_commands {
struct fwctl_info_bnxt {
__u32 uctx_caps;
};
+
+#define FWCTL_BNXT_MAX_DMABUF 0x10000 /* 64 KiB */
+
#endif