From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 3A147C282D1 for ; Sun, 9 Mar 2025 10:48:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 08EBD605C9; Sun, 9 Mar 2025 10:48:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id LYwgMfCYjn-A; Sun, 9 Mar 2025 10:48:09 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 58111606F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1741517289; bh=6K3rMkGKwZc5jvMd/z4ZpGe61fYCEZVXizmE07X2kg8=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LIniX2FBFuVbuctTEU29soXeZp76SHoyjJfLBbAlOoGeZPXCIsvUTJZwlXTylO238 aBCDKFHBTax1TZfnah2Dwcd539+9RBjytC5doGUKRPGHEIQ3CeePOSvWpSqKk2Ltmb G+l/cwdV1uCqY9iWqEb0az1v2FBhvNVxRPI0Ak1UfKzsULJzF2/8c62Uhj8CP8QO1B BBRgjdW+DHxMAN5IzMXo9B4AddcREM27gStzLNUjHmGWfhTTqkPsG0S7m1YUB8m66p vc/buo+9B2mgQKJcXNk/bvPPivMcdim7Vfiyr4dLeLfcO77ddDt5qmMoQ8qEjVnAxm aMMfYtTtqD8Xw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 58111606F6; Sun, 9 Mar 2025 10:48:09 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id D2C611E3 for ; Sun, 9 Mar 2025 10:48:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B1CEC400AC for ; Sun, 9 Mar 2025 10:48:06 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 4w235BlszzAD for ; Sun, 9 Mar 2025 10:48:05 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=198.175.65.16; helo=mgamail.intel.com; envelope-from=faizal.abdul.rahim@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org B7D92400B9 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B7D92400B9 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by smtp2.osuosl.org (Postfix) with ESMTPS id B7D92400B9 for ; Sun, 9 Mar 2025 10:48:05 +0000 (UTC) X-CSE-ConnectionGUID: gApoSHy1Rq2O5n4Ck4UvSA== X-CSE-MsgGUID: U3ZFoofiTNOpshvj2glXSg== X-IronPort-AV: E=McAfee;i="6700,10204,11367"; a="42636078" X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="42636078" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2025 03:48:05 -0700 X-CSE-ConnectionGUID: +kkGwincTH6eUfK8UqN41A== X-CSE-MsgGUID: XfulHuz5RqynWY/grWCn6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,234,1736841600"; d="scan'208";a="124655083" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by orviesa003.jf.intel.com with ESMTP; 09 Mar 2025 03:47:57 -0700 From: Faizal Rahim To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Simon Horman , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Russell King , Vladimir Oltean , Serge Semin , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , Choong Yong Liang , Chwee-Lin Choong , Faizal Rahim , Kunihiko Hayashi , Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org Date: Sun, 9 Mar 2025 06:46:39 -0400 Message-Id: <20250309104648.3895551-6-faizal.abdul.rahim@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> References: <20250309104648.3895551-1-faizal.abdul.rahim@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741517286; x=1773053286; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=cRb+CbjWo0ZjK0e4vuvO/MeSF/KtBDAkMvyjIUZVP0Y=; b=JOKkDpIQyDM/UmIda8HNTnkKYhltG9o0h2TeTeAfFZbFqCAkRni13CJE 25PElInI58dOil4xBSCG8AQVA/dGKEpk7dGYneD21qaLHKNKBb4IpsgyZ TP102I6YZJsnqVZToZXEeld/YvmwwpNrZOrGjRKzDpzUo0OBuGIgLZQSV NG6mACQmY0dPSxM4FgpNH83JXJJlv1D7ipRVTQ2DyEx7iXqaF247imepr 8LX6ER/WZQXGRWI1kMokUk+n8FaMiHOp551tKNhL5Hzsce+zfF4biiG4W 3p9nf5bnmURAEhD57tovRJ4UcO0yS4ZRknrwpZBpRwdUeg575L3DMnnu0 w==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=JOKkDpIQ Subject: [Intel-wired-lan] [PATCH iwl-next v9 05/14] igc: rename I225_RXPBSIZE_DEFAULT and I225_TXPBSIZE_DEFAULT X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Rename RX and TX packet buffer size macros in preparation for an upcoming patch that will refactor buffer size handling using FIELD_PREP and GENMASK. Changes: - Rename I225_RXPBSIZE_DEFAULT to IGC_RXPBSIZE_EXP_BMC_DEFAULT. The EXP_BMC suffix explicitly indicates Express and BMC buffer default values, improving readability and reusability for the upcoming changes, while also better reflecting the current buffer allocations. - Rename I225_TXPBSIZE_DEFAULT to IGC_TXPBSIZE_DEFAULT. These registers apply to both i225 and i226, so using the IGC prefix aligns with existing macro naming conventions. Signed-off-by: Faizal Rahim --- drivers/net/ethernet/intel/igc/igc_defines.h | 7 ++++--- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 8e449904aa7d..b6744ece64f0 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -396,9 +396,10 @@ #define IGC_RCTL_PMCF 0x00800000 /* pass MAC control frames */ #define IGC_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */ -#define I225_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */ -#define I225_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */ -#define IGC_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */ +/* RXPBSIZE default value for Express and BMC buffer */ +#define IGC_RXPBSIZE_EXP_BMC_DEFAULT 0x000000A2 +#define IGC_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */ +#define IGC_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */ #define IGC_TXPBSIZE_TSN 0x04145145 /* 5k bytes buffer for each queue */ diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 99123eef610b..6f0110e3ac22 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7156,8 +7156,8 @@ static int igc_probe(struct pci_dev *pdev, } /* configure RXPBSIZE and TXPBSIZE */ - wr32(IGC_RXPBS, I225_RXPBSIZE_DEFAULT); - wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT); + wr32(IGC_RXPBS, IGC_RXPBSIZE_EXP_BMC_DEFAULT); + wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT); timer_setup(&adapter->watchdog_timer, igc_watchdog, 0); timer_setup(&adapter->phy_info_timer, igc_update_phy_info, 0); diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c index 1e44374ca1ff..498741d83ca6 100644 --- a/drivers/net/ethernet/intel/igc/igc_tsn.c +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c @@ -136,7 +136,7 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter) int i; wr32(IGC_GTXOFFSET, 0); - wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT); + wr32(IGC_TXPBS, IGC_TXPBSIZE_DEFAULT); wr32(IGC_DTXMXPKTSZ, IGC_DTXMXPKTSZ_DEFAULT); if (igc_is_device_id_i226(hw)) -- 2.34.1