From: Saeed Mahameed <saeedm@nvidia.com>
To: Pavan Chebbi <pavan.chebbi@broadcom.com>
Cc: jgg@ziepe.ca, michael.chan@broadcom.com,
linux-kernel@vger.kernel.org, dave.jiang@intel.com,
Jonathan.Cameron@huawei.com, gospo@broadcom.com,
selvin.xavier@broadcom.com, leon@kernel.org,
kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH v3 fwctl 3/5] fwctl/bnxt_en: Create an aux device for fwctl
Date: Wed, 4 Feb 2026 15:47:28 -0800 [thread overview]
Message-ID: <aYPakD5VdYm-CiEk@sx113> (raw)
In-Reply-To: <20260129155453.3626544-4-pavan.chebbi@broadcom.com>
On 29 Jan 07:54, Pavan Chebbi wrote:
>Create an additional auxiliary device to support fwctl.
>The next patch will create bnxt_fwctl and bind to this
>device.
>
>Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
>Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
>---
> drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 12 ++++++++++--
> include/linux/bnxt/ulp.h | 1 +
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
>index 3097fc5755e6..9fd3c1e43224 100644
>--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
>+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
>@@ -50,6 +50,8 @@ static bool bnxt_auxdev_is_active(struct bnxt *bp, int idx)
>
> static struct bnxt_aux_device bnxt_aux_devices[__BNXT_AUXDEV_MAX] = {{
> .name = "rdma",
>+}, {
>+ .name = "fwctl",
> }};
>
> static void bnxt_fill_msix_vecs(struct bnxt *bp, struct bnxt_msix_entry *ent)
>@@ -278,6 +280,11 @@ void bnxt_ulp_stop(struct bnxt *bp)
> aux_priv = bp->aux_priv[i];
> edev = bp->edev[i];
> mutex_lock(&edev->en_dev_lock);
>+ if (i == BNXT_AUXDEV_FWCTL) {
>+ edev->flags |= BNXT_EN_FLAG_ULP_STOPPED;
>+ mutex_unlock(&edev->en_dev_lock);
>+ continue;
>+ }
This felt a bet off so I had to comment on patch 2. The fact that you need
to maintain a edev flag for ULP state was before using aux bus for all
upls which was kindof ok since it was unconditionally set on
bnxt_stop/start, but now the state got pretty complex with the introduction
of dangling aux devices as I mentioned in the previous patch. please see
suggestion on that patch, I am sure this can be simplified a lot.
> if (!bnxt_ulp_registered(edev) ||
> (edev->flags & BNXT_EN_FLAG_ULP_STOPPED)) {
> mutex_unlock(&edev->en_dev_lock);
>@@ -316,7 +323,7 @@ void bnxt_ulp_start(struct bnxt *bp)
> aux_priv = bp->aux_priv[i];
> edev = bp->edev[i];
> mutex_lock(&edev->en_dev_lock);
>- if (!bnxt_ulp_registered(edev) ||
>+ if (i == BNXT_AUXDEV_FWCTL || !bnxt_ulp_registered(edev) ||
> !(edev->flags & BNXT_EN_FLAG_ULP_STOPPED)) {
> goto clear_flag_continue;
> }
>@@ -521,7 +528,8 @@ void bnxt_aux_devices_add(struct bnxt *bp)
> aux_dev = &bp->aux_priv[idx]->aux_dev;
> rc = auxiliary_device_add(aux_dev);
> if (rc) {
>- netdev_warn(bp->dev, "Failed to add auxiliary device for ROCE\n");
>+ netdev_warn(bp->dev, "Failed to add auxiliary device for auxdev type %d\n",
>+ idx);
> auxiliary_device_uninit(aux_dev);
> if (idx == BNXT_AUXDEV_RDMA)
> bp->flags &= ~BNXT_FLAG_ROCE_CAP;
>diff --git a/include/linux/bnxt/ulp.h b/include/linux/bnxt/ulp.h
>index 1a4643c46f86..0851ad3394b0 100644
>--- a/include/linux/bnxt/ulp.h
>+++ b/include/linux/bnxt/ulp.h
>@@ -24,6 +24,7 @@ struct bnxt;
>
> enum bnxt_auxdev_type {
> BNXT_AUXDEV_RDMA = 0,
>+ BNXT_AUXDEV_FWCTL,
> __BNXT_AUXDEV_MAX
> };
>
>--
>2.39.1
>
next prev parent reply other threads:[~2026-02-04 23:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 15:54 [PATCH v3 fwctl 0/5] fwctl/bnxt_fwctl: fwctl for Broadcom Netxtreme devices Pavan Chebbi
2026-01-29 15:54 ` [PATCH v3 fwctl 1/5] fwctl/bnxt_en: Move common definitions to include/linux/bnxt/ Pavan Chebbi
2026-01-29 15:54 ` [PATCH v3 fwctl 2/5] fwctl/bnxt_en: Refactor aux bus functions to be more generic Pavan Chebbi
2026-01-30 11:37 ` Jonathan Cameron
2026-01-30 12:26 ` Pavan Chebbi
2026-02-04 23:44 ` Saeed Mahameed
2026-02-05 4:00 ` Pavan Chebbi
2026-02-05 8:41 ` Pavan Chebbi
2026-01-29 15:54 ` [PATCH v3 fwctl 3/5] fwctl/bnxt_en: Create an aux device for fwctl Pavan Chebbi
2026-01-30 11:39 ` Jonathan Cameron
2026-02-04 23:47 ` Saeed Mahameed [this message]
2026-01-29 15:54 ` [PATCH v3 fwctl 4/5] fwctl/bnxt_fwctl: Add bnxt fwctl device Pavan Chebbi
2026-01-30 12:03 ` Jonathan Cameron
2026-01-30 15:19 ` Jason Gunthorpe
2026-02-05 0:19 ` Saeed Mahameed
2026-02-05 4:25 ` Pavan Chebbi
2026-02-05 15:09 ` Pavan Chebbi
2026-02-05 17:33 ` Jason Gunthorpe
2026-02-05 17:47 ` Andy Gospodarek
2026-02-05 18:42 ` Jason Gunthorpe
2026-02-06 0:19 ` Andy Gospodarek
2026-02-06 0:39 ` Jason Gunthorpe
2026-02-06 1:24 ` Pavan Chebbi
2026-02-06 1:29 ` Jason Gunthorpe
2026-02-06 4:45 ` Pavan Chebbi
2026-02-09 13:41 ` Andy Gospodarek
2026-02-17 14:43 ` Pavan Chebbi
2026-01-29 15:54 ` [PATCH v3 fwctl 5/5] fwctl/bnxt_fwctl: Add documentation entries Pavan Chebbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYPakD5VdYm-CiEk@sx113 \
--to=saeedm@nvidia.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dave.jiang@intel.com \
--cc=gospo@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=pavan.chebbi@broadcom.com \
--cc=selvin.xavier@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox