From patchwork Thu Jul 9 08:00:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 73615 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D54B1A0526; Thu, 9 Jul 2020 10:17:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE4191E53C; Thu, 9 Jul 2020 10:14:45 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id CBF8B1DFF0 for ; Thu, 9 Jul 2020 10:14:31 +0200 (CEST) IronPort-SDR: AxT0NiICf4L+olV/Hfp/J5p0wNiUDHE3aatubTAWd/zqrzB3KjjHZAjVosYerAIlprah2Zp9UM cpVhCNiQ+NRQ== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="212869417" X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="212869417" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 01:14:31 -0700 IronPort-SDR: qAXuqvIglQDrCiHLsVPbNc4fA9zzVAw3ZOCl2ZWyXlnrWZnaTwDu3F+7KIFAUF9JNCHf7Jf/zR Ss7PVa1cLuvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="297989356" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2020 01:14:26 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun , Stanislaw Grzeszczak Date: Thu, 9 Jul 2020 08:00:44 +0000 Message-Id: <20200709080046.65879-18-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709080046.65879-1-guinanx.sun@intel.com> References: <20200702031329.4495-1-guinanx.sun@intel.com> <20200709080046.65879-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v3 17/19] net/ixgbe/base: check host interface return status X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Writing to read-only fields returns a non-OK Return Status for shadow RAM write command for X550. This information was previously discarded. Signed-off-by: Stanislaw Grzeszczak Signed-off-by: Guinan Sun Reviewed-by: Wei Zhao --- drivers/net/ixgbe/base/ixgbe_x550.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 8343efbc2..05199abb8 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -3248,7 +3248,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status = ixgbe_host_interface_command(hw, (u32 *)&buffer, sizeof(buffer), - IXGBE_HI_COMMAND_TIMEOUT, false); + IXGBE_HI_COMMAND_TIMEOUT, true); + if (status != IXGBE_SUCCESS) { + DEBUGOUT2("for offset %04x failed with status %d\n", + offset, status); + return status; + } + + if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) { + DEBUGOUT2("for offset %04x host interface return status %02x\n", + offset, buffer.hdr.rsp.buf_lenh_status); + return IXGBE_ERR_HOST_INTERFACE_COMMAND; + } return status; }