From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0625ECE58D for ; Wed, 9 Oct 2019 14:17:43 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id AC41820B7C for ; Wed, 9 Oct 2019 14:17:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=tom.com header.i=@tom.com header.b="2B5Q7TnX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC41820B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=tom.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 906981E8C9; Wed, 9 Oct 2019 16:17:19 +0200 (CEST) Received: from smtp.tom.com (smtprz14.163.net [106.3.154.247]) by dpdk.org (Postfix) with ESMTP id BF81F1E8A0 for ; Wed, 9 Oct 2019 16:17:15 +0200 (CEST) Received: from my-app01.tom.com (my-app01.tom.com [127.0.0.1]) by freemail01.tom.com (Postfix) with ESMTP id D6D1E1C8291B for ; Wed, 9 Oct 2019 22:17:27 +0800 (CST) Received: from my-app01.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app01 (TOM SMTP Server) with SMTP ID 2049061700 for ; Wed, 09 Oct 2019 22:17:27 +0800 (CST) Received: from antispam1.tom.com (unknown [172.25.16.55]) by freemail01.tom.com (Postfix) with ESMTP id CEE951C8276B for ; Wed, 9 Oct 2019 22:17:27 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1570630647; bh=bFRLz5FDjLo2MMOmkkgm5PG2OoBRTDYf/xOuIL77hF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2B5Q7TnX7UtjWSr/+GyHGj+HWU41t4ezyRKfE9HnEv0uqWzTOGsXcJVym75WW6ISe 5O4BZqjmUiVh0j2JFXS2p2bJJ1KnWweULZ98zDLkEURQ5JL4HSO4QF/iH++XlLHzlR /R/M7pHcHAPd/aua2Bgk+ANtI5gpBoNW106WjqvE= Received: from antispam1.tom.com (antispam1.tom.com [127.0.0.1]) by antispam1.tom.com (Postfix) with ESMTP id 6446B100179D for ; Wed, 9 Oct 2019 22:16:01 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam1.tom.com Received: from antispam1.tom.com ([127.0.0.1]) by antispam1.tom.com (antispam1.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b0gPaJKc9rZj for ; Wed, 9 Oct 2019 22:16:00 +0800 (CST) Received: from localhost.localdomain (unknown [114.119.4.74]) by antispam1.tom.com (Postfix) with ESMTPA id E9B3710011A1; Wed, 9 Oct 2019 22:15:59 +0800 (CST) From: "Wei Hu (Xavier)" To: dev@dpdk.org Cc: xavier.huwei@huawei.com Date: Wed, 9 Oct 2019 22:16:51 +0800 Message-Id: <20191009141653.39364-3-xavier.huwei@tom.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191009141653.39364-1-xavier.huwei@tom.com> References: <20191009141653.39364-1-xavier.huwei@tom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/4] net/hns3: change the return value of firmware processing timeout from -EBADE to -ETIME 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. 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 3eebfdd42..58776c2ec 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.23.0