> -----Original Message-----
> From: Zaremba, Larysa <[email protected]>
> Sent: Monday, November 17, 2025 3:43 PM
> To: Loktionov, Aleksandr <[email protected]>
> Cc: [email protected]; Nguyen, Anthony L
> <[email protected]>; Lobakin, Aleksander
> <[email protected]>; Samudrala, Sridhar
> <[email protected]>; Singhai, Anjali
> <[email protected]>; Michal Swiatkowski
> <[email protected]>; Fijalkowski, Maciej
> <[email protected]>; Tantilov, Emil S
> <[email protected]>; Chittim, Madhu <[email protected]>;
> Hay, Joshua A <[email protected]>; Keller, Jacob E
> <[email protected]>; Shanmugam, Jayaprakash
> <[email protected]>; Wochtman, Natalia
> <[email protected]>; Jiri Pirko <[email protected]>; David S.
> Miller <[email protected]>; Eric Dumazet <[email protected]>;
> Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>;
> Simon Horman <[email protected]>; Jonathan Corbet <[email protected]>;
> Richard Cochran <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Andrew Lunn <[email protected]>;
> [email protected]; [email protected]; linux-
> [email protected]
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 13/15] ixd: add
> reset checks and initialize the mailbox
> 
> On Mon, Nov 17, 2025 at 03:21:06PM +0100, Loktionov, Aleksandr wrote:
> >
> >
> > > -----Original Message-----
> > > From: Intel-wired-lan <[email protected]> On
> Behalf
> > > Of Larysa Zaremba
> > > Sent: Monday, November 17, 2025 2:49 PM
> > > To: [email protected]; Nguyen, Anthony L
> > > <[email protected]>
> > > Cc: Lobakin, Aleksander <[email protected]>; Samudrala,
> > > Sridhar <[email protected]>; Singhai, Anjali
> > > <[email protected]>; Michal Swiatkowski
> > > <[email protected]>; Zaremba, Larysa
> > > <[email protected]>; Fijalkowski, Maciej
> > > <[email protected]>; Tantilov, Emil S
> > > <[email protected]>; Chittim, Madhu
> > > <[email protected]>; Hay, Joshua A <[email protected]>;
> > > Keller, Jacob E <[email protected]>; Shanmugam, Jayaprakash
> > > <[email protected]>; Wochtman, Natalia
> > > <[email protected]>; Jiri Pirko <[email protected]>; David
> S.
> > > Miller <[email protected]>; Eric Dumazet <[email protected]>;
> > > Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>;
> > > Simon Horman <[email protected]>; Jonathan Corbet <[email protected]>;
> > > Richard Cochran <[email protected]>; Kitszel, Przemyslaw
> > > <[email protected]>; Andrew Lunn
> <[email protected]>;
> > > [email protected]; [email protected]; linux-
> > > [email protected]
> > > Subject: [Intel-wired-lan] [PATCH iwl-next v5 13/15] ixd: add
> reset
> > > checks and initialize the mailbox
> > >
> > > At the end of the probe, trigger hard reset, initialize and
> schedule
> > > the after-reset task. If the reset is complete in a pre-determined
> > > time, initialize the default mailbox, through which other
> resources
> > > will be negotiated.
> > >
> > > Co-developed-by: Amritha Nambiar <[email protected]>
> > > Signed-off-by: Amritha Nambiar <[email protected]>
> > > Reviewed-by: Maciej Fijalkowski <[email protected]>
> > > Signed-off-by: Larysa Zaremba <[email protected]>
> > > ---
> > >  drivers/net/ethernet/intel/ixd/Kconfig        |   1 +
> > >  drivers/net/ethernet/intel/ixd/Makefile       |   2 +
> > >  drivers/net/ethernet/intel/ixd/ixd.h          |  28 +++-
> > >  drivers/net/ethernet/intel/ixd/ixd_dev.c      |  89 +++++++++++
> > >  drivers/net/ethernet/intel/ixd/ixd_lan_regs.h |  40 +++++
> > >  drivers/net/ethernet/intel/ixd/ixd_lib.c      | 143
> > > ++++++++++++++++++
> > >  drivers/net/ethernet/intel/ixd/ixd_main.c     |  32 +++-
> > >  7 files changed, 326 insertions(+), 9 deletions(-)  create mode
> > > 100644 drivers/net/ethernet/intel/ixd/ixd_dev.c
> > >  create mode 100644 drivers/net/ethernet/intel/ixd/ixd_lib.c
> > >
> > > diff --git a/drivers/net/ethernet/intel/ixd/Kconfig
> > > b/drivers/net/ethernet/intel/ixd/Kconfig
> > > index f5594efe292c..24510c50070e 100644
> > > --- a/drivers/net/ethernet/intel/ixd/Kconfig
> > > +++ b/drivers/net/ethernet/intel/ixd/Kconfig
> > > @@ -5,6 +5,7 @@ config IXD
> > >   tristate "Intel(R) Control Plane Function Support"
> > >   depends on PCI_MSI
> > >   select LIBETH
> > > + select LIBIE_CP
> > >   select LIBIE_PCI
> > >   help
> > >     This driver supports Intel(R) Control Plane PCI Function diff
> >
> > ...
> >
> > > +/**
> > > + * ixd_check_reset_complete - Check if the PFR reset is completed
> > > + * @adapter: CPF being reset
> > > + *
> > > + * Return: %true if the register read indicates reset has been
> > > finished,
> > > + *          %false otherwise
> > > + */
> > > +bool ixd_check_reset_complete(struct ixd_adapter *adapter) {
> > > + u32 reg_val, reset_status;
> > > + void __iomem *addr;
> > > +
> > > + addr = libie_pci_get_mmio_addr(&adapter->cp_ctx.mmio_info,
> > > +                                ixd_reset_reg.rstat);
> > > + reg_val = readl(addr);
> > > + reset_status = reg_val & ixd_reset_reg.rstat_m;
> > > +
> > > + /* 0xFFFFFFFF might be read if the other side hasn't cleared
> > > +  * the register for us yet.
> > > +  */
> > > + if (reg_val != 0xFFFFFFFF &&
> > > +     reset_status == ixd_reset_reg.rstat_ok_v)
> > Magic number, I think 0xFFFFFFFF should be ~0U per kernel style.
> 
> I believe ~0U depends on the int size, but GENMASK() could work.
> 
If you want clarity for 32bits, of course GENMASK() is the best.
With GENMASK() you can have my
Reviewed-by: Aleksandr Loktionov <[email protected]>

> >
> > > +         return true;
> > > +
> > > + return false;
> > > +}
> >
> > ...
> >
> > > --
> > > 2.47.0
> >

Reply via email to