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 CF061A00C3 for ; Tue, 20 Sep 2022 02:15:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D85E4069B; Tue, 20 Sep 2022 02:15:04 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 6E5814021D; Tue, 20 Sep 2022 02:15:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663632903; x=1695168903; h=from:to:cc:subject:date:message-id; bh=GGIroaGyMx+x4Sjm2p5aWO9UG2ENMKrw4SrBRprHO9k=; b=Z43ESwt5meKXePQi38dcavOVoG10rJsf4c4+M50AnNMkSqNa7LIOVpxf q3UUzksqlk+qZFvKy4bqV/QqVb/D8tQakTtWgHAng7QIn09Yh3qBW7ZnS SgOKlbnlFHtda73xpTaI3cWGBHkF08VJvnZC+264271ubxdvgmDbSXWZn AXKfd/EA9tRsSP/7WO1Mw39tl9ND21aLVZmSWV+tMeyaWc6ZzAXIHxEW8 fHcNy/xQAaNABCdQ2GN/ogZL5NhBDXXJx1fJ2AuRE6k2ybP5UXUMlTWNx 2z5oDNzby+j7p5A13sGpG0suKv3sqX5cmIhsyNuWgV/MO8QHf8v/F5UuR g==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="298280693" X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="298280693" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 17:15:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="649360396" Received: from unknown (HELO npg-dpdk-simeisu-cvl-119d218.sh.intel.com) ([10.67.119.208]) by orsmga008.jf.intel.com with ESMTP; 19 Sep 2022 17:15:00 -0700 From: Simei Su To: qi.z.zhang@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, Simei Su , stable@dpdk.org Subject: [PATCH] net/ice: fix PTP init failed Date: Tue, 20 Sep 2022 08:14:26 +0800 Message-Id: <20220920001426.28266-1-simei.su@intel.com> X-Mailer: git-send-email 2.9.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Because of share code update, "ice_ptp_init_phc" API for E810/E822 depends on PHY configuration, not whether the device is E810 based. So before this API is called, assign specific value to phy cfg. Fixes: 646dcbe6c701 ("net/ice: support IEEE 1588 PTP") Cc: stable@dpdk.org Signed-off-by: Simei Su --- drivers/net/ice/ice_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 50fe23f..d64ecc7 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -5768,6 +5768,11 @@ ice_timesync_enable(struct rte_eth_dev *dev) return -1; } + if (ice_is_e810(hw)) + hw->phy_cfg = ICE_PHY_E810; + else + hw->phy_cfg = ICE_PHY_E822; + if (hw->func_caps.ts_func_info.src_tmr_owned) { ret = ice_ptp_init_phc(hw); if (ret) { -- 2.9.5