Received: by 10.223.185.116 with SMTP id b49csp6178993wrg; Thu, 8 Mar 2018 03:13:01 -0800 (PST) X-Google-Smtp-Source: AG47ELvjr775+o4IygNIOyeaM5IPimBOHLluNOVO1jTDTRRC5c9PwxcyGocURcLdMshMNR4fzGFq X-Received: by 2002:a17:902:b704:: with SMTP id d4-v6mr24189903pls.406.1520507581858; Thu, 08 Mar 2018 03:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520507581; cv=none; d=google.com; s=arc-20160816; b=yhAWbo+TvL93azkl8sC3fZRxk2SKLHJ5Z9Tvbrl/9J1/D4BvCZNxzH9HMM3RrElR/3 blaWtoEEEN+R8SnVUd4qCaN97mqkLZF6qHbywP6hNQADORHVaydl7o/0hO6M1jIp1G0Z Mqnec3hTFc9GzMLV6laEPsaxRzTUbhuccJvKZ3G5bTxSuMWja8drK0+FE1c2GbtJuuQ7 H4VcHzhgqsJNitA7B032cIYFsB89Qeh9TqmdteG8YbzUOuKqXhWAMihqvxxFXmpiftRF vikfrglH0p5V+NS8TDo6e8pG1DGqke2Cmj7izThFztrduy48I+XvYhbl3+tfK4HqRHnX pXiQ== 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=0fseZwgUKv6adKUTQUOk5Zhq4+/rwGbZ+Bkd/gXdwm0=; b=FlQGdYat32mai56bGxmo2MnNw4Mva1skjBJy8B2LzFIeWNJbh5GNfyDYrjQ+C5AbfL p9r2lBw3Kbujrt563u8pNogZifRJbtK7wlSJixmcZWwPo4yQCeeMb5Dxzbm3leVasbng deNgrHIQmU9opSB4xgQbSfVS9p+AcpMSmqjCxixt9CgaC6Vf4hkP79TyYX8jGQLQy3yt 4ZtmNnV+vmM2W1jiMtvDFCn+niuAPfxXl6QAoVcN0UDOf6hgygIwM5nktyWRBijcFcmB O3IGLlMDE5DbXrd87uCjc8x//btvfslsSX+4gIZmCIJ6/pTEUe+yV+YWLxThIPuwytaR fjBA== 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 o7si12801828pgs.314.2018.03.08.03.12.46; Thu, 08 Mar 2018 03:13:01 -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 S1755882AbeCHLK2 (ORCPT + 99 others); Thu, 8 Mar 2018 06:10:28 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6202 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755773AbeCHLKR (ORCPT ); Thu, 8 Mar 2018 06:10:17 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4A3522D88D4BF; Thu, 8 Mar 2018 19:10:03 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.361.1; Thu, 8 Mar 2018 19:09:54 +0800 From: Peng Li To: CC: , , , , Subject: [Patch net-next 2/6] net: hns3: set the cmdq out_vld bit to 0 after used Date: Thu, 8 Mar 2018 19:41:51 +0800 Message-ID: <1520509315-40895-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520509315-40895-1-git-send-email-lipeng321@huawei.com> References: <1520509315-40895-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 31383a6..6d48ebf 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -410,6 +410,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