From patchwork Fri Dec 13 08:32:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13906655 X-Patchwork-Delegate: kuba@kernel.org 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 A489A1925A4; Fri, 13 Dec 2024 08:32:36 +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=1734078756; cv=none; b=DLMZJpzDsoxU5JUl7O06bftrFliGWmXevXkAe9Vud/JRYaNMNAjFP0hVW6arJObAGcs6Vj78bZwXO400ielnwo2xyC42l/3HKtoQCh6a5Q1GbHVE9ePCZ/NQoPFIkv4vY/4nguhZEL1dhRIHpXAdORZemb1hBPgEDdjxL3Fdfog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734078756; c=relaxed/simple; bh=VsnNfOyHMOOyO6kBZYiq2DtvTDiNv3udddU/7YBRqUE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=OCLQPWneebNZzv4bkx/CGRnmhdtNy+Wy/kRUDWlSKqOBCPbBRVxgL9ztA1X6WbkCSuOfiaiVKt6qTPaPhrv6ALAFNK4C8t1EiWx+M78WLpUjnmVFxxRqTNL5hCXAVMFXmOzbONx7YEJJ2gbJ9J6WU3qbV4pZH7E8F9y6OHA5+CE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PyWcYPxB; 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="PyWcYPxB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 688CBC4CED0; Fri, 13 Dec 2024 08:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734078756; bh=VsnNfOyHMOOyO6kBZYiq2DtvTDiNv3udddU/7YBRqUE=; h=From:To:Cc:Subject:Date:From; b=PyWcYPxBTCqZrLl0Kv8s7RlVSxhukOhXC20z4c1+hwMzHX5y5Z5k+JOrU2LKbdY57 AoEAa/GySlX/5DJNSJaRQ1Jtyoy0WbOVWSQoYg1XCAnINmlBgGtWLES2bUmKMPfIrd p7WdvZY6QmFQzdF3hi4zujpJVBASqTxIM8OxcjOooeY+Xy32UmepDWLUfUuh2cUWzg x5EbJUIgvAh4x9zcCQg0Ek7KY6JVYUzC+SEzsXzJYbjnnmNnFkz/POjnYeplqH5w8H ZIOlyCST0vhE4HNj3DR/KWXzUeMVcqdAzPZOSsDkh0F01P/GGYLgm2e0l7oi1p8Dv6 CVzqKuc30EFsQ== From: Arnd Bergmann To: Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Bharat Bhushan , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , Simon Horman , Zhipeng Lu , Dipendra Khadka , Ratheesh Kannoth , Sai Krishna , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] octeontx2-af: fix build regression without CONFIG_DCB Date: Fri, 13 Dec 2024 09:32:18 +0100 Message-Id: <20241213083228.2645757-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Arnd Bergmann When DCB is disabled, the pfc_en struct member cannot be accessed: drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c: In function 'otx2_is_pfc_enabled': drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:22:48: error: 'struct otx2_nic' has no member named 'pfc_en' 22 | return IS_ENABLED(CONFIG_DCB) && !!pfvf->pfc_en; | ^~ drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c: In function 'otx2_nix_config_bp': drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:1755:33: error: 'IEEE_8021QAZ_MAX_TCS' undeclared (first use in this function) 1755 | req->chan_cnt = IEEE_8021QAZ_MAX_TCS; | ^~~~~~~~~~~~~~~~~~~~ Move the member out of the #ifdef block to avoid putting back another check in the source file and add the missing include file unconditionally. Fixes: a7ef63dbd588 ("octeontx2-af: Disable backpressure between CPT and NIX") Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 1 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index bf56888e7fe7..2b49bfec7869 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "otx2_reg.h" diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h index 44d737a0dd09..65814e3dc93f 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h @@ -505,9 +505,9 @@ struct otx2_nic { /* Devlink */ struct otx2_devlink *dl; -#ifdef CONFIG_DCB /* PFC */ u8 pfc_en; +#ifdef CONFIG_DCB u8 *queue_to_pfc_map; u16 pfc_schq_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC]; bool pfc_alloc_status[NIX_PF_PFC_PRIO_MAX];