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 C8FEC4404F; Wed, 12 Jun 2024 17:26:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3BFF43308; Wed, 12 Jun 2024 17:07:11 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id E8504432D4 for ; Wed, 12 Jun 2024 17:07:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204825; x=1749740825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0yYuguSpRr+BzlXGl+2xK8L8hdDuPexguD4RmFRc+1A=; b=mBwQmulCYMNAjAsjf6x2fBKZOEODBE+c630ySOBdFveeCsTT6h98l0cZ EcEqtvqAgjnvAa8WPeNqI5CsjAr+LVfOsBfeS+Yvu9ENeG3oRXeuw3doe q0Cy9wssd64dmoIr+Skop4FM59jwRaV+nUvJ6jwPraylSEB7PatO+QqkT H2OM1ASKmaTnSFo+k8yaBcnX/DQ86EV5cLG2d1lZkdi9aDMAgb8QLet+S Tfdb4sOCAvAHhrPri4Gs49GxMi/uwvbtz3S/vv1VOuUw3Mpa7FWV16Qwc W2otCZh+Tn02zRt1uK7PzOEIRGIm2/LAe92TVUiG+wRu8jBbI7d4Jg0u2 w==; X-CSE-ConnectionGUID: 76tsr4OpRsKFs+P6IipIyA== X-CSE-MsgGUID: Smxr/f8mSQmtiurajtv5jg== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32460133" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32460133" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:07:05 -0700 X-CSE-ConnectionGUID: LlV/oNzeTHa6PZeeYKxhfA== X-CSE-MsgGUID: 42F6Evv3QT2YBmiUerkpzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39926029" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:07:03 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Ben Shelton Subject: [PATCH v2 136/148] net/ice/base: add AQ function to configure SyncE error reporting Date: Wed, 12 Jun 2024 16:02:10 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@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: Ian Stokes The AE driver will call this function to enable the SyncE error reporting mechanism and enable event reporting when errors occur. Signed-off-by: Ben Shelton Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 29 +++++++++++++++++++++++++++++ drivers/net/ice/base/ice_common.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 3f7d1543ee..f3b9a6f481 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -5501,6 +5501,35 @@ ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u16 tc_bitmap, ICE_SCHED_NODE_OWNER_LAN); } +/** + * ice_aq_cfg_cgu_err + * @hw: pointer to the HW struct + * @ena_event_report: enable or disable event reporting + * @ena_err_report: enable/re-enable or disable error reporting mechanism + * @cd: pointer to command details structure or NULL + * + * Configure CGU error reporting mechanism (0x0C60) + */ +int +ice_aq_cfg_cgu_err(struct ice_hw *hw, bool ena_event_report, + bool ena_err_report, struct ice_sq_cd *cd) +{ + struct ice_aqc_cfg_cgu_err *cmd; + struct ice_aq_desc desc; + + cmd = &desc.params.config_cgu_err; + + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_cfg_cgu_err); + + if (!ena_event_report) + cmd->cmd |= ICE_AQC_CFG_CGU_EVENT_DIS; + + if (!ena_err_report) + cmd->cmd |= ICE_AQC_CFG_CGU_ERR_DIS; + + return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); +} + /** * ice_aq_get_sensor_reading * @hw: pointer to the HW struct diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h index 7acf36384d..16cb0b12c1 100644 --- a/drivers/net/ice/base/ice_common.h +++ b/drivers/net/ice/base/ice_common.h @@ -270,6 +270,9 @@ void ice_sbq_lock(struct ice_hw *hw); void ice_sbq_unlock(struct ice_hw *hw); int ice_sbq_rw_reg(struct ice_hw *hw, struct ice_sbq_msg_input *in, u16 flag); int +ice_aq_cfg_cgu_err(struct ice_hw *hw, bool ena_event_report, bool ena_err_report, + struct ice_sq_cd *cd); +int ice_aq_get_sensor_reading(struct ice_hw *hw, u8 sensor, u8 format, struct ice_aqc_get_sensor_reading_resp *data, struct ice_sq_cd *cd); -- 2.43.0