From: Yuan Wang <yuanx.wang@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com, vladimir.medvedkin@intel.com,
Karol Kolacinski <karol.kolacinski@intel.com>,
Yuan Wang <yuanx.wang@intel.com>
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 [thread overview]
Message-ID: <20250114101024.159941-8-yuanx.wang@intel.com> (raw)
In-Reply-To: <20250114101024.159941-1-yuanx.wang@intel.com>
From: Karol Kolacinski <karol.kolacinski@intel.com>
Add max_drift_thresh parameter to ixgbe_get_ptp_by_phy() to allow
passing maxDriftThreshold parameter from the response.
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
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
next prev parent reply other threads:[~2025-01-14 10:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 10:10 [PATCH 00/10] update net/ixgbe base driver Yuan Wang
2025-01-14 10:10 ` [PATCH 01/10] net/ixgbe/base: fix TSAM checking return value Yuan Wang
2025-01-14 10:10 ` [PATCH 02/10] net/ixgbe/base: add interface for LED control on E610 Yuan Wang
2025-01-14 10:10 ` [PATCH 03/10] net/ixgbe/base: disable 2.5/5G speeds from auto-negotiation for E610 Yuan Wang
2025-01-14 10:10 ` [PATCH 04/10] net/ixgbe/base: Add PTP by PHY feature " Yuan Wang
2025-01-14 10:10 ` [PATCH 05/10] net/ixgbe/base: add definition of FW temp event " Yuan Wang
2025-01-14 10:10 ` [PATCH 06/10] net/ixgbe/base: Add capability for OROM recovery update Yuan Wang
2025-01-14 10:10 ` Yuan Wang [this message]
2025-01-14 10:10 ` [PATCH 08/10] net/ixgbe/base: update VF HV subsystem device ID constant Yuan Wang
2025-01-14 10:10 ` [PATCH 09/10] net/ixgbe/base: add missing buffer copy Yuan Wang
2025-01-14 10:10 ` [PATCH 10/10] net/ixgbe: update base driver README Yuan Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250114101024.159941-8-yuanx.wang@intel.com \
--to=yuanx.wang@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=karol.kolacinski@intel.com \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).