From patchwork Tue Oct 1 13:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Machon X-Patchwork-Id: 13818032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 298D0CEACC2 for ; Tue, 1 Oct 2024 13:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fJzh7W5wlOZU9cK2g6AipS8kuPYUfSiH/UDbedoU6tk=; b=C1srqPpS9kJnf7p3ImAF4+AR54 MSy3CyZ1jy9ooNn4sLdvd7JlCrQl5SbwPfPnkGlDR6a8c7kwJfPE625JtVoXq1JIS9EisEFyivxBJ j6nHc3xOkVO0Zy6jP6dQBmAmYHuXBD01kqsLRNv+e2YjK0oMiz/Zkn1sM0yvmamaPhkEO/DtQElZI lZ5kbeB+PMLKRDnQInEYGM71MVGglRlpJUV49Psf5J0ff73fNuJL4HKMU6y+tCnLk7lHPaP2ehUHd fuCpkZsmzAb91/yLyITX9FX3a9jFNlFi7Uax1xgUdb9y8aM1vWnRSBB3vLtcucreLnXTQIwtXzJMK /cYxp5Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svdJ1-000000030uy-3QfB; Tue, 01 Oct 2024 13:52:47 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svdHi-000000030Xw-2pFq for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 13:51:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1727790686; x=1759326686; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=xfk6sO9sDW2Ddsv8scWV99zq1MGaAerIsbhg1d4kARA=; b=gU8KZUdcSdaCXgt4xjrG9R0dbLG356tfKUsXvgNbCMfgF9hNqlcOlYd5 bTNHUlWTk1LscMu0L3ZkX8EnIDzudZwXmIVXFYGNsLoCqUszjoJCuWB/B 4JdEVHOOkEVY8xDZwV+qvtzPHlKQ8G8xL/9A3BKwMmjaAyoQv9hPbepkE 8HVmMF0OjE4BMsq9kVAr4XQPyLSgeeL+KTUhR7OWnqd35BAKyIn7qlDi6 bTYTKLYA15+VhgBISz2Jsk5pEXCcJqshSCVPJxsd6g2VBj7HTb0JLxcki wuByQeicVv7IcKeVvsfYiC5AQiuuVk3o5Y7YYzClIdgFv6w7zdneTL4PR w==; X-CSE-ConnectionGUID: +oQdX0lcTd+VPfROt+JSQg== X-CSE-MsgGUID: Z7fujs2dQPqAvcR6B7HZfg== X-IronPort-AV: E=Sophos;i="6.11,167,1725346800"; d="scan'208";a="33057480" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 01 Oct 2024 06:51:24 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 1 Oct 2024 06:51:13 -0700 Received: from DEN-DL-M70577.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 1 Oct 2024 06:51:10 -0700 From: Daniel Machon Date: Tue, 1 Oct 2024 15:50:34 +0200 Subject: [PATCH net-next 04/15] net: sparx5: modify SPX5_PORTS_ALL macro MIME-Version: 1.0 Message-ID: <20241001-b4-sparx5-lan969x-switch-driver-v1-4-8c6896fdce66@microchip.com> References: <20241001-b4-sparx5-lan969x-switch-driver-v1-0-8c6896fdce66@microchip.com> In-Reply-To: <20241001-b4-sparx5-lan969x-switch-driver-v1-0-8c6896fdce66@microchip.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , "Steen Hegelund" , , , , Richard Cochran , , , , , CC: , , X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_065126_912883_C69BD8B0 X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In preparation for lan969x, we need to define the SPX5_PORTS_ALL macro as 70 (65 front ports + 5 internal ports). This is required as the SPX5_PORT_CPU will be redefined as a non-constant in a subsequent patch. And as SPX5_PORTS_ALL is used as an array size troughout the code, we have to make sure that it stays a constant. Signed-off-by: Daniel Machon Reviewed-by: Steen Hegelund Reviewed-by: Jacob Keller --- drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h index fdff83537418..824849869f61 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h @@ -52,13 +52,14 @@ enum sparx5_vlan_port_type { }; #define SPX5_PORTS 65 +#define SPX5_PORTS_ALL 70 /* Total number of ports */ + #define SPX5_PORT_CPU (SPX5_PORTS) /* Next port is CPU port */ #define SPX5_PORT_CPU_0 (SPX5_PORT_CPU + 0) /* CPU Port 65 */ #define SPX5_PORT_CPU_1 (SPX5_PORT_CPU + 1) /* CPU Port 66 */ #define SPX5_PORT_VD0 (SPX5_PORT_CPU + 2) /* VD0/Port 67 used for IPMC */ #define SPX5_PORT_VD1 (SPX5_PORT_CPU + 3) /* VD1/Port 68 used for AFI/OAM */ #define SPX5_PORT_VD2 (SPX5_PORT_CPU + 4) /* VD2/Port 69 used for IPinIP*/ -#define SPX5_PORTS_ALL (SPX5_PORT_CPU + 5) /* Total number of ports */ #define PGID_BASE SPX5_PORTS /* Starts after port PGIDs */ #define PGID_UC_FLOOD (PGID_BASE + 0)