From patchwork Wed Jan 15 00:08:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13939695 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75F7B20326 for ; Wed, 15 Jan 2025 00:08:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736899741; cv=none; b=eza2ikU899Y26/W6qgracd9CdV6VgsXkRjoEZk9pa0+YsIEEdnVbqPRL1oVetDRTdGE59juMsmasTzv1TJJ+utXAeQMF9w1r9hCLMQDYndtS7t22YLividCbUGlgyfnJ+OiM5nV/A06k9VGdDtE0USeqFZx3y/7I52QebQ28TIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736899741; c=relaxed/simple; bh=CHp661+t+7H9/4pEJJ8EFBpReKWewJIAWGP69BALars=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NP3wvOhuuV6E0OqdQH8PDEr+NE2NwGIXi068Fpjcf2G92lrVrWx+Oc+ZkWrs9+rrnlh9shh+IunXNAUuX9cRcKMujozu/ZWmcWeb0WcPjGf3+4F9HlYOr0BWidMdUvoKBZ0Q0bvO021CsYHMXmOGVQ70AJS39J5ygJyTqkdF8w0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=H/4jrRwi; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="H/4jrRwi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736899739; x=1768435739; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CHp661+t+7H9/4pEJJ8EFBpReKWewJIAWGP69BALars=; b=H/4jrRwiFHEKeigLtpXydWVZRsW6H4BwtiW4XKqfZcLPG4WnQUvnR8oM OrMaapQJxs+bEV1swN97ezF0N1fk0MoGbJZ6QGopBii4UFudUMkOYrmJ/ 1eyyKhGfpfUTHMeD9vxcv8vh3Wy9ZgePGQp9AKJXhDtrhwOCsxPePb/d5 XMGpiEaIqsumcyIEJtBbQLzdLDFByeifw8qktHnL24E+AhDd7LwElBDCI h7vnEmLCiktIl9uU1E96i1afehcymaRdaBWV8ATl7ihUHOnoOSA6wNjIx Xr/hgB8lxj6iGm6VdEFlndpDfTJAsR8jgDotKj4r21080CXgjZgSpRIXF Q==; X-CSE-ConnectionGUID: 5TqUCVFNRziN/Kvmp6p4XA== X-CSE-MsgGUID: tEY3Us9ESM+h1kUr3fp+5Q== X-IronPort-AV: E=McAfee;i="6700,10204,11315"; a="40897522" X-IronPort-AV: E=Sophos;i="6.12,315,1728975600"; d="scan'208";a="40897522" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2025 16:08:55 -0800 X-CSE-ConnectionGUID: gJtlnN60QCyyQyEzzDtkiQ== X-CSE-MsgGUID: twYxgTr0ToyJHjMAsYl44g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="128211438" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by fmviesa002.fm.intel.com with ESMTP; 14 Jan 2025 16:08:55 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, andrew+netdev@lunn.ch, netdev@vger.kernel.org Cc: Jacob Keller , anthony.l.nguyen@intel.com, anton.nadezhdin@intel.com, przemyslaw.kitszel@intel.com, milena.olech@intel.com, arkadiusz.kubalewski@intel.com, richardcochran@gmail.com, mschmidt@redhat.com, Karol Kolacinski Subject: [PATCH net-next v2 11/13] ice: check low latency PHY timer update firmware capability Date: Tue, 14 Jan 2025 16:08:37 -0800 Message-ID: <20250115000844.714530-12-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115000844.714530-1-anthony.l.nguyen@intel.com> References: <20250115000844.714530-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Jacob Keller Newer versions of firmware support programming the PHY timer via the low latency interface exposed over REG_LL_PROXY_L and REG_LL_PROXY_H. Add support for checking the device capabilities for this feature. Co-developed-by: Karol Kolacinski Signed-off-by: Karol Kolacinski Signed-off-by: Jacob Keller Reviewed-by: Milena Olech Signed-off-by: Anton Nadezhdin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_common.c | 3 +++ drivers/net/ethernet/intel/ice/ice_type.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 7af169466655..9d143c6803f1 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -2641,6 +2641,7 @@ ice_parse_1588_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, info->ts_ll_read = ((number & ICE_TS_LL_TX_TS_READ_M) != 0); info->ts_ll_int_read = ((number & ICE_TS_LL_TX_TS_INT_READ_M) != 0); + info->ll_phy_tmr_update = ((number & ICE_TS_LL_PHY_TMR_UPDATE_M) != 0); info->ena_ports = logical_id; info->tmr_own_map = phys_id; @@ -2663,6 +2664,8 @@ ice_parse_1588_dev_caps(struct ice_hw *hw, struct ice_hw_dev_caps *dev_p, info->ts_ll_read); ice_debug(hw, ICE_DBG_INIT, "dev caps: ts_ll_int_read = %u\n", info->ts_ll_int_read); + ice_debug(hw, ICE_DBG_INIT, "dev caps: ll_phy_tmr_update = %u\n", + info->ll_phy_tmr_update); ice_debug(hw, ICE_DBG_INIT, "dev caps: ieee_1588 ena_ports = %u\n", info->ena_ports); ice_debug(hw, ICE_DBG_INIT, "dev caps: tmr_own_map = %u\n", diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h index d01a9e798678..f5eac66d207e 100644 --- a/drivers/net/ethernet/intel/ice/ice_type.h +++ b/drivers/net/ethernet/intel/ice/ice_type.h @@ -369,6 +369,7 @@ struct ice_ts_func_info { #define ICE_TS_TMR1_ENA_M BIT(26) #define ICE_TS_LL_TX_TS_READ_M BIT(28) #define ICE_TS_LL_TX_TS_INT_READ_M BIT(29) +#define ICE_TS_LL_PHY_TMR_UPDATE_M BIT(30) struct ice_ts_dev_info { /* Device specific info */ @@ -383,6 +384,7 @@ struct ice_ts_dev_info { u8 tmr1_ena; u8 ts_ll_read; u8 ts_ll_int_read; + u8 ll_phy_tmr_update; }; #define ICE_NAC_TOPO_PRIMARY_M BIT(0)