Received: by 10.223.185.116 with SMTP id b49csp5786524wrg; Wed, 7 Mar 2018 18:39:51 -0800 (PST) X-Google-Smtp-Source: AG47ELs1eUlrEDdt4rG1jfPn+ufMRMgqgGxcdXIGTXH7IrymCbaWM93GbMKPeKzxNhrBCZgpysd+ X-Received: by 10.101.102.21 with SMTP id w21mr20479274pgv.247.1520476791347; Wed, 07 Mar 2018 18:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520476791; cv=none; d=google.com; s=arc-20160816; b=JZ+5UvJA7F1SvPu+8FuFfwZYrtaGWyJluLeorKQYEQCE9qnLGwyuixVZFAMnVteooA 7Si5tuSfj8h5iB1sXUvGnOg3WRDLCY+alxz8sKdf3YfX2r7fdrcfirinr5GLWAY1wTNS faPnyHcnDIpIk5l0uc3Tr9zAuNrKXZFto1wZSfcNhxvW3xp8rm8h1uAEgZm5y6gONorm SmFKuDLXwaeHjkb1digIjPxY757Abhz09W0zcOn27onhZoyQnizIkjgbBOjKenaabpRL axnSESryyiqEuCZ1C2IeMwH0IDdVodPtfygt0Yu0IVRi2AxfsqDpWsZ0OwzEjbScF1S1 sgLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Oor/spLwAJUjR35e8SK95/YmdzjxITx6x88Qku1uamA=; b=BHWccoet4JmbYdVB48vGlVBJG4j/AV3ZlFjAwXToe9FSIrydNOcQ07fOxMQUO9aiGI IK8ec3Qi0WlJzLIA4/yHF9GcBmnT7Rsr9nDgRAYK8CQxQC5H2QK7vX2rIKphHYZauQSI wKlNyOB3P8DLK5Iga04B6RRLtsW8DaS+ARNzp+kcPxZaKDhcrMz9SKHIMHZS+F+Wyp7V tnhTM9YGuxcZPRgz8xeXfeJTYZa8hrbotuIulDYiU/cxlLuWBXV8JD3tOVBLPDHJZDrJ xXpyQ7OPgU22ZX3bmgzzkFWG1ArDwDYjg19/mY4k5iIGlwKKOXF9mzRfR82useEwxzBh 8aJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj11-v6si1862678plb.286.2018.03.07.18.39.36; Wed, 07 Mar 2018 18:39:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964871AbeCHCiR (ORCPT + 99 others); Wed, 7 Mar 2018 21:38:17 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5757 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934842AbeCHCfB (ORCPT ); Wed, 7 Mar 2018 21:35:01 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 42AC892401364; Thu, 8 Mar 2018 10:34:44 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Thu, 8 Mar 2018 10:34:36 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 03/23] {topost} net: hns3: set the cmdq out_vld bit to 0 after used Date: Thu, 8 Mar 2018 11:06:28 +0800 Message-ID: <1520478408-116992-4-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520478408-116992-1-git-send-email-lipeng321@huawei.com> References: <1520478408-116992-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Driver check the out_vld bit when get a new cmdq BD, if the bit is 1, the BD is valid. driver Should set the bit 0 after used and hw will set the bit 1 if get a valid BD. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index ea78a99..3a2c174 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -412,6 +412,7 @@ void hclge_mbx_handler(struct hclge_dev *hdev) req->msg[0]); break; } + crq->desc[crq->next_to_use].flag = 0; hclge_mbx_ring_ptr_move_crq(crq); } diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c index e39cad2..18283ef 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c @@ -171,6 +171,7 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev) req->msg[0]); break; } + crq->desc[crq->next_to_use].flag = 0; hclge_mbx_ring_ptr_move_crq(crq); flag = le16_to_cpu(crq->desc[crq->next_to_use].flag); } -- 2.9.3