Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2476563imm; Mon, 16 Jul 2018 08:38:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8g732lbpvUL0w2mPcRoEMqf3FZfmysbzf2BKZ8jUbpOY9FglJZVJgBGyHaJWSOYoKQ+Sg X-Received: by 2002:a65:504c:: with SMTP id k12-v6mr15881916pgo.435.1531755531257; Mon, 16 Jul 2018 08:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755531; cv=none; d=google.com; s=arc-20160816; b=t0+7keL5Sm8iZp3GngP69iJcctxg4No+dHXwEuLRgGeb82yQ5yCiaXVAE4AzlqF4Ji Ubkxzt9eyFWVoX6XwlVDONr5o4c4FqmapGACQiSlIvc0Ai1fZQQdpNdava9XJaBBV2U1 y6rdGFr76AR78zFyv5n0Efavp6o2ZB4ohTEXca2nmmfMFvPUc8IdOUFV9XXxqsRSy8Tp 4XZiEBJ8e+WjVTC5JhSZEVOTWv8lAyExiPaa7FoFbM7MK7AqI1klM1HjVszcd91jOMU5 48PTRFxo1fwwhm5U47OqK0Ew4sr2SaTcdpqiezV+WBJauaGTXhgsRmi0piPOmUpZ6NNZ H03w== 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=BW5xnvMRbmtpq858RGGQDztF6ni0OgyjVO0a6q0Vtg8=; b=uSl4oMEQnvZ+EG26l7jD3SNxnNjSZ0gAkhFZ7RoHwEAfjuOgzOUTTXvp1b4jVXlp06 iEjU+mnBYbppkUPF2ZO4l2xjUMAPFoqIHzA0C8NG1X5APZjjo9D2SW+FNXmA76jyzB8g GAmYFaFvrRZE0mgC0ZZao86pJScNdAu+rZF4iJsmqf++bK6mlgf2NABk0ZVEh6R4TYtt bgLRZ/iWMzkzZkJCpO4hv9GaWXAG6KQb4f13QQbwQJ7fYLl+3995lRuz5W0t6twfZoU8 +rgquxAR+8TzXSztjntko8BL7SWV2HSLe78tfIqE2NUDFoGeAq0Jz7HWKOPoBeqpK9jy xWng== 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 o188-v6si25647420pfo.236.2018.07.16.08.38.36; Mon, 16 Jul 2018 08:38:51 -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 S1731548AbeGPQFp (ORCPT + 99 others); Mon, 16 Jul 2018 12:05:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9628 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731420AbeGPQFp (ORCPT ); Mon, 16 Jul 2018 12:05:45 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 49F4C50490F97; Mon, 16 Jul 2018 23:37:29 +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:23 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 8/9] net: hns3: Fix for using wrong mask and shift in hclge_get_ring_chain_from_mbx Date: Mon, 16 Jul 2018 16:36:26 +0100 Message-ID: <20180716153627.476-9-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: Fuyun Liang HCLGE_INT_GL_IDX_M and HCLGE_INT_GL_IDX_S are used to set fireware cmd. When getting int_gl value from mailbox message, we should use HNAE3_RING_GL_IDX_M and HNAE3_RING_GL_IDX_S. Fixes: 79eee4108541 ("net: hns3: add int_gl_idx setup for VF") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index 50ae2f8..9d36bcc 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -131,8 +131,8 @@ static int hclge_get_ring_chain_from_mbx( hnae3_set_bit(ring_chain->flag, HNAE3_RING_TYPE_B, req->msg[3]); ring_chain->tqp_index = hclge_get_queue_id(vport->nic.kinfo.tqp[req->msg[4]]); - hnae3_set_field(ring_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, - HCLGE_INT_GL_IDX_S, + hnae3_set_field(ring_chain->int_gl_idx, HNAE3_RING_GL_IDX_M, + HNAE3_RING_GL_IDX_S, req->msg[5]); cur_chain = ring_chain; @@ -151,8 +151,8 @@ static int hclge_get_ring_chain_from_mbx( [req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i + HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 1]]); - hnae3_set_field(new_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, - HCLGE_INT_GL_IDX_S, + hnae3_set_field(new_chain->int_gl_idx, HNAE3_RING_GL_IDX_M, + HNAE3_RING_GL_IDX_S, req->msg[HCLGE_MBX_RING_NODE_VARIABLE_NUM * i + HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + 2]); -- 2.7.4