Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2477564imm; Mon, 16 Jul 2018 08:39:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdNgskR/vUTPNCA97+lelEZ8Nr3eWPtpPDhlxaahtIpPuwKzJWiobinF2VdP1QQOaiOV9p6 X-Received: by 2002:a63:291:: with SMTP id 139-v6mr16076807pgc.365.1531755590726; Mon, 16 Jul 2018 08:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755590; cv=none; d=google.com; s=arc-20160816; b=m6DRVUx5oO75HzXOEHbxoRRwrlzZHyRc9qOlgvpWYsCpBYmhxCfNcH70AKHa/v4DN4 sa+KbPZIwiMr36w21BIIZN4NR+aEFOVclkXBols5uR0RRDINGvRAt3U5fyujmQM1kS5T VMmkyHiZHx80vmbl23RQHSA5x/ZbJazINeWZYewID9oE6Bi0sV6bwEon6DYrIgnAmFtU LOdDUmdxPtP5VsNLHtmuCyrcNdZd65SiZfSp5Cr4C5AhMFFXpxQQ9jfxLMq/smPhGUZ/ B1MwwhsBOPD3Y/9kpoU9VJ+d8BJQwxKGKgj3Fm/ake6aLFkCx/LHaAtL1tzP1TvoBxVS fcTw== 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=RydeVn7HLC1NSYoqB0O/U3s9982d2tocwGiI60kFjrc=; b=TRo/S+I0/qC9H7HYEFOfyGP/pag++poCDo2ZrsipS0SO7llGG40Ny/8pr5z1sRQ3xi cyTPCQpLHSn/HDmVj/6og5PtzLoAEpZ1LzRxFuY4Xy8Qfh9n5bsyMv1k9R2PVOdYR6yx vQ90WddWNOaAyvcHXffHqf+wNEqHg9SA6Y3suY5FG1kbJfa3RB8l5RvNTTtFVObDisY7 WvB361qc/Mu3kG2s3Fn3PaeavOOFwPh+0oVc02bit4931iXtgKBgDZmQuymm1HByJdtb jSpJNqZCzISWHxIK7GgRjnkOu2VLgDLPDkxZZKXw69mYk/5U8rEB066EXUXfE6G1PrFJ xusg== 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 u11-v6si14130111plm.143.2018.07.16.08.39.35; Mon, 16 Jul 2018 08:39:50 -0700 (PDT) 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 S1730638AbeGPQFX (ORCPT + 99 others); Mon, 16 Jul 2018 12:05:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9626 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727715AbeGPQFW (ORCPT ); Mon, 16 Jul 2018 12:05:22 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 128E92D81D973; Mon, 16 Jul 2018 23:37:09 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Mon, 16 Jul 2018 23:37:04 +0800 From: Salil Mehta To: CC: , , , , , , , Huazhong Tan Subject: [PATCH net-next 1/9] net: hns3: Modify the order of initializing command queue register Date: Mon, 16 Jul 2018 16:36:19 +0100 Message-ID: <20180716153627.476-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180716153627.476-1-salil.mehta@huawei.com> References: <20180716153627.476-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan According to hardware's description, the head pointer register should be written before the tail pointer register while doing command queue initialization. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c index eca4b23..cf40afc 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c @@ -119,8 +119,8 @@ static void hclge_cmd_config_regs(struct hclge_cmq_ring *ring) hclge_write_dev(hw, HCLGE_NIC_CSQ_DEPTH_REG, (ring->desc_num >> HCLGE_NIC_CMQ_DESC_NUM_S) | HCLGE_NIC_CMQ_ENABLE); - hclge_write_dev(hw, HCLGE_NIC_CSQ_TAIL_REG, 0); hclge_write_dev(hw, HCLGE_NIC_CSQ_HEAD_REG, 0); + hclge_write_dev(hw, HCLGE_NIC_CSQ_TAIL_REG, 0); } else { hclge_write_dev(hw, HCLGE_NIC_CRQ_BASEADDR_L_REG, lower_32_bits(dma)); @@ -129,8 +129,8 @@ static void hclge_cmd_config_regs(struct hclge_cmq_ring *ring) hclge_write_dev(hw, HCLGE_NIC_CRQ_DEPTH_REG, (ring->desc_num >> HCLGE_NIC_CMQ_DESC_NUM_S) | HCLGE_NIC_CMQ_ENABLE); - hclge_write_dev(hw, HCLGE_NIC_CRQ_TAIL_REG, 0); hclge_write_dev(hw, HCLGE_NIC_CRQ_HEAD_REG, 0); + hclge_write_dev(hw, HCLGE_NIC_CRQ_TAIL_REG, 0); } } -- 2.7.4