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

Jason Gunthorpe <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.