Re: [PATCH v5 fwctl 3/3] fwctl/bnxt: add DMA buffer support for HWRM commands

From: Jason Gunthorpe

Date: Fri Aug 07 2026 - 10:31:29 EST


On Fri, Aug 07, 2026 at 09:32:34AM +0530, Pavan Chebbi wrote:
> > struct hwrm_dbg_ptrace_input {
> > __le16 req_type;
> > __le16 cmpl_ring;
> > __le16 seq_id;
> > __le16 target_id;
> > __le64 resp_addr;
> > __le32 pdi_cmd_buf_addr[2];
> > __le32 pdi_resp_buf_addr[2];
> > ^^^
> >
> > This is really sketchy to cast an array to a __le64. If it really
> > means a __le64 then the struct should say that, if it doesn't mean a
> > __le64 then this is broken right?
> >
>
> Since hsi.h is generated from the HWRM spec rather than hand authored,
> it'd need to be fixed at that source.
> I will take this as a follow up change that we need to do internally..

But it is correct to be a le64 and the sketchy cast is Ok?

Jason