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 BA74645695; Tue, 23 Jul 2024 15:11:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A147840A75; Tue, 23 Jul 2024 15:11:01 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 84D074021D for ; Tue, 23 Jul 2024 15:10:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721740260; x=1753276260; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=1C5OM7j8JX+9IFjwjEHS5h/Qb8ud+IkOnfjsPmc7VME=; b=eyHa/PJuoNyuvkcVRbT8QKxIDsHH3LR5LUXpsrCtMZFmfsbOg7EKzCvw 4jjOFkSPhxkf+kKVE5SgzPx++IY9nNxTju4fsh1CQM+XJql+IkwaRSxD7 Yg8/WtTghBn1GG7FU7GRYcN8ANMIDlzozzFcoxwNSnO8CyYAI6uKhIIzd m19u5faqJGote0efXMjrUYY/vUbRnYSmXqOGIMeeD9NuOOxUOXNoNAh5f 0qk0k7olea6w6U0ZcsAhLd0ygx8fJbV6qSIukEXl2gcBcZs4JqXng2fl5 L+U0IwbcZ+EAgjMVccwq+bg8TCwxy13egn6XYkEKpYR6TksRhkLKalzqG Q==; X-CSE-ConnectionGUID: /1bJHtb2SJqPRYxSZ2buwg== X-CSE-MsgGUID: FZuYdzPLSneWjY/NoWYJxw== X-IronPort-AV: E=McAfee;i="6700,10204,11142"; a="29954294" X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208";a="29954294" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2024 06:10:59 -0700 X-CSE-ConnectionGUID: OTMXVTF4SXqA1p9gZlV/cA== X-CSE-MsgGUID: NAu2ifFeRFSuxfrHtXuNBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,230,1716274800"; d="scan'208";a="82866941" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa002.jf.intel.com with ESMTP; 23 Jul 2024 06:10:58 -0700 From: Anatoly Burakov To: dev@dpdk.org, Paul Greenwalt , Bruce Richardson Subject: [PATCH v1 1/1] net/ice: fix E830 PTP phy model Date: Tue, 23 Jul 2024 14:10:56 +0100 Message-ID: <1f6ca9415c22415fc73d7bd72f220e09b5f79025.1721740015.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 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 Currently, we manually set PHY model in `ice_dev_init`, however we missed adding case for E830, so for E830 the initialization ends up calling E822 code instead. This results in incorrect phy model being set and having several downstream consequences for E830 as a result, ranging from a stray error message from attempting to start PHY timer, and up to inability to enable timesync on E830 devices. We could've fixed it by adding a case for E830, however there are several other missing bits of initialization (such as `phy_ports` field). All of this can be fixed by replacing manual setting of `phy_model` with a call to `ice_ptp_init_phy_model()`, which calls into base code and initializes the fields appropriately for all device types, including another option that is missing from current implementation - ETH56G. Fixes: c3bedb7114f2 ("net/ice/base: add E830 PTP initialization") Signed-off-by: Anatoly Burakov --- drivers/net/ice/ice_ethdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 29509b4329..304f959b7e 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2496,10 +2496,8 @@ ice_dev_init(struct rte_eth_dev *dev) /* Initialize TM configuration */ ice_tm_conf_init(dev); - if (ice_is_e810(hw)) - hw->phy_model = ICE_PHY_E810; - else - hw->phy_model = ICE_PHY_E822; + /* Initialize PHY model */ + ice_ptp_init_phy_model(hw); if (hw->phy_model == ICE_PHY_E822) { ret = ice_start_phy_timer_e822(hw, hw->pf_id); -- 2.43.5