From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95051A32A3 for ; Fri, 25 Oct 2019 14:36:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C94D1C11A; Fri, 25 Oct 2019 14:36:39 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id 205581C190 for ; Fri, 25 Oct 2019 14:36:37 +0200 (CEST) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 13C8635DF66930A3D34D; Fri, 25 Oct 2019 20:36:36 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Fri, 25 Oct 2019 20:36:27 +0800 From: "Wei Hu (Xavier)" To: CC: , , , , Date: Fri, 25 Oct 2019 20:37:04 +0800 Message-ID: <1572007025-43391-4-git-send-email-xavier.huwei@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572007025-43391-1-git-send-email-xavier.huwei@huawei.com> References: <1572007025-43391-1-git-send-email-xavier.huwei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 3/4] net/hns3: fix the return value when firmware timeout 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" From: Hongbo Zheng Configuration commands are sent to firmware for processing. When firmware processing timeout, the corresponding error code is returned. Considering that it is more reasonable to use error code -ETIME for timeout error, the error code for processing timeout is changed from -EBADE to -ETIME. Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware") Signed-off-by: Hongbo Zheng Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index 3eebfdd..58776c2 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -359,7 +359,7 @@ static int hns3_cmd_poll_reply(struct hns3_hw *hw) timeout++; } while (timeout < hw->cmq.tx_timeout); hns3_err(hw, "Wait for reply timeout"); - return -EBADE; + return -ETIME; } /* -- 2.7.4