From patchwork Mon Jul 16 15:36:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 142038 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2568754ljj; Mon, 16 Jul 2018 08:37:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfB+QQheWxYnsn/tPuf5jHbgAp8IhGVrlNg8U8VmdJK5tqDiaIeJgGNQD0gaXY84GFSUFx7 X-Received: by 2002:a62:d39b:: with SMTP id z27-v6mr18695909pfk.182.1531755470542; Mon, 16 Jul 2018 08:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755470; cv=none; d=google.com; s=arc-20160816; b=Y0qqt6/GoXFQK1cJfWg1mTJBfm9IgHz5HtVO1iYK/jvrW5QYJEpM8xn42NMXG30IkM T4/uVLoczETc/hjFc+Tw+8yP/iBVAK+Dfzm92vigJMsuHYhBfVojbCCWVNaAYzBlma7n VP8oMnIZKWzAAv4GOecmh5PBV2aSbDFl31a4VQPBUKuD7ylExFEoYhd6vMe/qqeyKpaJ ooNVibe5oiK0kJSt3xtyJIF+kNlQaOxhsY4uxLd6Nzq+goA1+qWVxiiKolbLxeWWbtOd VesksgLb/HmuUYbDhT8hidsAglQXFEKytA2/TZxLFtZqL5d5YWsxOqBLSWiWWhlYxxrt AuHA== 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 c3-v6si6041087pld.457.2018.07.16.08.37.50; Mon, 16 Jul 2018 08:37: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 S1731556AbeGPQFp (ORCPT + 31 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 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(-) -- 2.7.4 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]);