From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C58B54404F; Wed, 12 Jun 2024 17:09:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A16F042799; Wed, 12 Jun 2024 17:03:59 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 3140A4278C for ; Wed, 12 Jun 2024 17:03:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204637; x=1749740637; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j2WyNkNxvJ/JZUNcb7qDJ9/UFB/BrRz2OqkXP+3Kr9g=; b=k5gEXt0049nLJHo997+ujfyZ7oJFSsWBl5ap/U7N7wvDhWLVcrrvMWPw b5u2m/NuzS0Tu3LCO5yvsc/e1fU4IPWJjKkTgKxYoA4zAJUmTDvwILB1n z70t4XjF7BPETQRqju/3UGP1BTdqc5b4g5nuyK32EwtqYExomh7lD6TM1 DDtnOXFWXu6jnpc5fSvt61tEd/u8w5JreP2BnL38VFPQY+HmrC/l/YQ9q TeUkjJhMbEOPYad4sQu94Ds5z/EPlNr1zeUJczj31GCRGyLlzhCZcTuoR V4QoYyIUthWlkrRZjNs4dhYYr2Kp9ewwnm9T/bRvBq6tZXzNep+PCpBYe g==; X-CSE-ConnectionGUID: SAINWeL6QtSaXfidChp0yQ== X-CSE-MsgGUID: 5F0JoqB0TX278LRRVcYiGw== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459263" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459263" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:03:57 -0700 X-CSE-ConnectionGUID: 3ml/jtvqTb+Oe0mV/AHn0w== X-CSE-MsgGUID: fViG5l4yTCanoUROU0Y8mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39924988" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:03:55 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Sergey Temerkhanov , Grzegorz Nitka Subject: [PATCH v2 025/148] net/ice/base: use model-dependent number of PHY ports Date: Wed, 12 Jun 2024 16:00:19 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Ian Stokes Set up and use model-dependent number of PHY ports. Also fix iterations over PTP ports. Define 'max_phy_port', a new ice_hw struct member to store the max port number handled by given clock owner. Replace 'phy_ports' with 'max_phy_port' for max range in iterations over PTP ports in case of ETH56G based devices. Signed-off-by: Sergey Temerkhanov Signed-off-by: Grzegorz Nitka Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 2 ++ drivers/net/ice/base/ice_type.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index 8ce803bfb3..5ce48250b4 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -1814,6 +1814,8 @@ ice_ptp_init_phy_cfg(struct ice_hw *hw) hw->phy_cfg = ICE_PHY_E810; else hw->phy_cfg = ICE_PHY_E822; + hw->phy_ports = ICE_NUM_EXTERNAL_PORTS; + hw->max_phy_port = ICE_NUM_EXTERNAL_PORTS; return 0; } diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 7a1471e474..48f892bfd3 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1260,6 +1260,8 @@ struct ice_hw { u8 pf_id; /* device profile info */ enum ice_phy_cfg phy_cfg; + u8 phy_ports; + u8 max_phy_port; u8 logical_pf_id; u16 max_burst_size; /* driver sets this value */ -- 2.43.0