[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALs4sv1fgxciFsdxj=5C2HD7HKxHt7Z9t8CNNe6Q+Q6bz-FAKw@mail.gmail.com>
Date: Thu, 2 Oct 2025 13:49:43 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: jgg@...pe.ca, michael.chan@...adcom.com, dave.jiang@...el.com,
saeedm@...dia.com, Jonathan.Cameron@...wei.com, davem@...emloft.net,
corbet@....net, edumazet@...gle.com, gospo@...adcom.com, kuba@...nel.org,
netdev@...r.kernel.org, pabeni@...hat.com, andrew+netdev@...n.ch,
selvin.xavier@...adcom.com
Subject: Re: [PATCH net-next 2/6] bnxt_en: Refactor aux bus functions to be generic
On Tue, Sep 30, 2025 at 12:36 AM Leon Romanovsky <leon@...nel.org> wrote:
>
> > index 992eec874345..665850753f90 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
> > @@ -27,11 +27,11 @@
> > #include "bnxt.h"
> > #include "bnxt_hwrm.h"
> >
> > -static DEFINE_IDA(bnxt_aux_dev_ids);
> > +static DEFINE_IDA(bnxt_rdma_aux_dev_ids);
>
> I would argue that this complexity is not needed, so this and following
> two patches are very questionable.
>
> 1. The desire is to generate IDs inside auxiliary_device_create() function
> and not create IDA per-driver or like in this case per-auxdevice.
Thanks Leon, this corrects my understanding.
> 2. You are not expected to mix both function pointers and auxdevices
> which pretends to be separate devices with separate drivers. Core code
> shouldn't call to auxdevice to avoid circular dependency. Auxdevice is
> expected to call to core device instead.
I went through the history of how the aux was implemented in bnxt and it's
because we need to space out init and add, the core maintains the pointers
to aux devices. I added additional pointers for the new aux device but I do see
scope to improve my patch to avoid circular calls. I will be back with v5 after
net-next opens.
>
> Thanks
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)
Powered by blists - more mailing lists