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 09C24454EF; Tue, 25 Jun 2024 13:29:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CCB243374; Tue, 25 Jun 2024 13:20:23 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 9A2B242F6F for ; Tue, 25 Jun 2024 13:18:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314287; x=1750850287; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=llvk3nDeLRUyVCSH00YOoDT9aikcPRpXpxLoQaRmUss=; b=T8EQAMpmAdV8QzWconkyq6PaTUI/bb0dH7au8c3IVQZwfb0AI0foE/c2 y14ieUcR1LT2cTQzJlwy61R8ACHrIhMBTgKCOuDKcqZ0iiMs6IgI3tBXE kftpTqsXGjkFwbSHsoNcbAt9OrfvYJ4Sluj2YsbYcjbeEJsNxW4rHJZID o2DYXueuBp8tTSPeOaDNq6yid3KAgDVe+EFEEcPeSkuDuJVsTRlOP4uEx hnqT1utKRovGt5koNyMTuEPqBIO989bDn4pqI9/ebq8pd/foHRKqRxOep Rh/098jCoh79f7QSnnQz5hIER/BPmUlWaKChroxVKO8AXqIv29t5s6JpE Q==; X-CSE-ConnectionGUID: WldECseZQymBnKtfNFt1FQ== X-CSE-MsgGUID: qyjrzxpVRkmrHwKNuetayg== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080642" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080642" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:18:07 -0700 X-CSE-ConnectionGUID: 89vGuqJYSaWFhMNvOJw9aQ== X-CSE-MsgGUID: M3YZ1HzSTJaljJqyvIH1Iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719752" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:18:07 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ben Shelton , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 116/129] net/ice/base: add AQ function to configure SyncE error reporting Date: Tue, 25 Jun 2024 12:14:01 +0100 Message-ID: <1c58666c934b05d122234be32643549033f1278a.1719313664.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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: Ben Shelton 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 8fcd27a594..536392776f 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -5490,6 +5490,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 d1ceb406de..71b1f34d0a 100644 --- a/drivers/net/ice/base/ice_common.h +++ b/drivers/net/ice/base/ice_common.h @@ -269,6 +269,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