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 DF8EA46084; Tue, 14 Jan 2025 11:14:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B689C4065F; Tue, 14 Jan 2025 11:14:04 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id ADE794065C for ; Tue, 14 Jan 2025 11:14:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736849643; x=1768385643; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ow06GuwGZyZBFNLsopq6yei0TyFfMDc6ZDHeIvYf2aQ=; b=XnHOBfWZFy/ULS81MDOeZtwgQhNY7XmD/Zb2cAB+M4UJvd7YIvfjPZE/ 1v5JnfluZLOv01oUYfkK+j1fu24GLmvm5QVolZR7BPRJ8vRnD0y89tdRv dvLZ9DUO2YD3qslQfaKK8E9zmTWxw5hBlxONeN5Q6KwqOaKtW6eM7fSgg yKHbvtbC/3EdL/jz/s5MQhBUxmu7Iw43PkFUMd7vS2qrhlazII1tAGVp2 S/bN02YBTHD10S0kZWl5bhYMMzTW+VjZTD5xuDb4/AOmO/tuRfe0x4EbU 8kMFlD7OlFbkQXJ1z6YWb2UggmfRxImqWmSKlTChhKt+JC9chW6nWefPS w==; X-CSE-ConnectionGUID: HpYYO/2ERSGd9UmLBDbWuA== X-CSE-MsgGUID: LFEN0MZlQWujjoLI89OWHQ== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="36426807" X-IronPort-AV: E=Sophos;i="6.12,314,1728975600"; d="scan'208";a="36426807" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:14:02 -0800 X-CSE-ConnectionGUID: fuGeF54DSce8SWs6G+rX1w== X-CSE-MsgGUID: W7V3slgLTIua0nTjEuNpuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="128007391" Received: from unknown (HELO localhost.localdomain) ([10.239.252.210]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 02:14:00 -0800 From: Yuan Wang To: dev@dpdk.org Cc: anatoly.burakov@intel.com, vladimir.medvedkin@intel.com, Karol Kolacinski , Yuan Wang Subject: [PATCH 07/10] net/ixgbe/base: add max_drift_thresh to get_ptp_by_phy Date: Tue, 14 Jan 2025 18:10:17 +0800 Message-ID: <20250114101024.159941-8-yuanx.wang@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250114101024.159941-1-yuanx.wang@intel.com> References: <20250114101024.159941-1-yuanx.wang@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: Karol Kolacinski Add max_drift_thresh parameter to ixgbe_get_ptp_by_phy() to allow passing maxDriftThreshold parameter from the response. Signed-off-by: Karol Kolacinski Signed-off-by: Yuan Wang --- drivers/net/ixgbe/base/ixgbe_e610.c | 5 ++++- drivers/net/ixgbe/base/ixgbe_e610.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c b/drivers/net/ixgbe/base/ixgbe_e610.c index 802dfb5062..dc4eafaa5a 100644 --- a/drivers/net/ixgbe/base/ixgbe_e610.c +++ b/drivers/net/ixgbe/base/ixgbe_e610.c @@ -1833,12 +1833,14 @@ s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags) * @hw: pointer to the HW struct * @ptp_config: timestamp mode config * @flags: timestamp mode flags + * @max_drift_thresh: maximal PHY clock drift threshold * * Get PTP by PHY using ACI command (0x0635). * * Return: 0 on success, negative error code otherwise */ -s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags) +s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags, + u16 *max_drift_thresh) { struct ixgbe_aci_cmd_get_ptp_by_phy_resp *resp; struct ixgbe_aci_desc desc; @@ -1851,6 +1853,7 @@ s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags) if (!status) { *ptp_config = resp->ptp_config; *flags = resp->flags; + *max_drift_thresh = IXGBE_LE16_TO_CPU(resp->maxDriftThreshold); } return status; diff --git a/drivers/net/ixgbe/base/ixgbe_e610.h b/drivers/net/ixgbe/base/ixgbe_e610.h index ccf76e3b9b..f60268cf91 100644 --- a/drivers/net/ixgbe/base/ixgbe_e610.h +++ b/drivers/net/ixgbe/base/ixgbe_e610.h @@ -48,7 +48,8 @@ s32 ixgbe_aci_set_event_mask(struct ixgbe_hw *hw, u8 port_num, u16 mask); s32 ixgbe_configure_lse(struct ixgbe_hw *hw, bool activate, u16 mask); s32 ixgbe_set_ptp_by_phy(struct ixgbe_hw *hw, u8 ptp_request, u8 flags); -s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags); +s32 ixgbe_get_ptp_by_phy(struct ixgbe_hw *hw, u8 *ptp_config, u8 *flags, + u16 *max_drift_thresh); s32 ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw, struct ixgbe_aci_cmd_get_link_topo *cmd, -- 2.43.5