From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83DCE23D2B4 for ; Mon, 2 Feb 2026 08:35:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770021341; cv=none; b=J5SztW0MGx7SzmOIJWxCnmP0whzLOs96l1qJc0EApLNPMau+cSlwEfckMvKRZdbq6Iwp0cx5QZf6wnMuIcz3MzP+3ZMUV3PrxCf+VLzxKOJXQWLHqk1pXxyZKOZmfWyXchgq1JrZMconZutoZVI3XHLYfmCBDfVWuROa7+/a3RE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770021341; c=relaxed/simple; bh=Gc/luKh3Hpf6Q+OucejaKlI3LOq0esd56HE55DZGmCA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JGaVZ2QsddIbZ+lfHNB+7Km9eWZ9qh8eKTdwuQ5ltAHsleYsQsdCBeOGzM0ZlEvdK98d3v+bmVq7wuqQrcu9m5UWLwG3mVXFEzlg1zCrBjHBq4rPXXMSINRoCDt9gbGeqdx7X8WALh3PXp7BGrUldpDMbRHgQzRD28p2ld4wUi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bsu/ClXU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bsu/ClXU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B134CC116C6; Mon, 2 Feb 2026 08:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770021341; bh=Gc/luKh3Hpf6Q+OucejaKlI3LOq0esd56HE55DZGmCA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bsu/ClXUr2wYTMboKa8qt8Gl9tr6/PupqkB8lMPOoySmkfKwUeV9P4Jdrf0CYrJWU E/KMxJlTY27VtQy2Pcnl9BZVCDj1LUwYi8T9TgLtYXkeD9TSjVkAaWPm5ehiVdWBhj /bHPsafZW6jUs88upvsDQ/09g+na8JZ2EH8vkmzkZCwmnislpw0StS40hpaQs7xEmT rh/2H1XHiW5kXDe4PjdU+V23f3a5clvwkDIvQ3CiRFv9tADFHGouQ46mrMtbb3wtw/ eqjz1xj8ybi+DeJ0cOxvRehxkSsKF5EZ7xI0OYWB4RPbFTIt78/QWrOGGwZfIRgLkO rS/dD1ItMLAjw== Date: Mon, 2 Feb 2026 10:35:36 +0200 From: Leon Romanovsky To: Pavan Chebbi Cc: jgg@ziepe.ca, michael.chan@broadcom.com, linux-kernel@vger.kernel.org, dave.jiang@intel.com, saeedm@nvidia.com, Jonathan.Cameron@huawei.com, gospo@broadcom.com, selvin.xavier@broadcom.com, kalesh-anakkur.purayil@broadcom.com Subject: Re: [PATCH v4 fwctl 2/5] fwctl/bnxt_en: Refactor aux bus functions to be more generic Message-ID: <20260202083536.GF34749@unreal> References: <20260130164146.3752166-1-pavan.chebbi@broadcom.com> <20260130164146.3752166-3-pavan.chebbi@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260130164146.3752166-3-pavan.chebbi@broadcom.com> On Fri, Jan 30, 2026 at 08:41:43AM -0800, Pavan Chebbi wrote: > Up until now there was only one auxiliary device that bnxt > created and that was for RoCE driver. bnxt fwctl is also > going to use an aux bus device that bnxt should create. > This requires some nomenclature changes and refactoring of > the existing bnxt aux dev functions. > > Convert 'aux_priv' and 'edev' members of struct bnxt into > arrays where each element contains supported auxbus device's > data. Move struct bnxt_aux_priv from bnxt.h to ulp.h because > that is where it belongs. Make aux bus init/uninit/add/del > functions more generic which will loop through all the aux > device types. Make bnxt_ulp_start/stop functions (the only > other common functions applicable to any aux device) loop > through the aux devices to update their config and states. > Make callers of bnxt_ulp_start() call it only when there > are no errors. > > Also, as an improvement in code, bnxt_register_dev() can skip > unnecessary dereferencing of edev from bp, instead use the > edev pointer from the function parameter. > > Future patches will reuse these functions to add an aux bus > device for fwctl. > > Reviewed-by: Andy Gospodarek > Signed-off-by: Pavan Chebbi > --- > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 47 ++- > drivers/net/ethernet/broadcom/bnxt/bnxt.h | 19 +- > .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 8 +- > .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- > drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 339 +++++++++++------- > include/linux/bnxt/ulp.h | 25 +- > 6 files changed, 273 insertions(+), 167 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky