lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYPakD5VdYm-CiEk@sx113>
Date: Wed, 4 Feb 2026 15:47:28 -0800
From: Saeed Mahameed <saeedm@...dia.com>
To: Pavan Chebbi <pavan.chebbi@...adcom.com>
Cc: jgg@...pe.ca, michael.chan@...adcom.com, linux-kernel@...r.kernel.org,
	dave.jiang@...el.com, Jonathan.Cameron@...wei.com,
	gospo@...adcom.com, selvin.xavier@...adcom.com, leon@...nel.org,
	kalesh-anakkur.purayil@...adcom.com
Subject: Re: [PATCH v3 fwctl 3/5] fwctl/bnxt_en: Create an aux device for
 fwctl

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@...adcom.com>
>Signed-off-by: Pavan Chebbi <pavan.chebbi@...adcom.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ