Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp25871pxb; Fri, 15 Jan 2021 05:02:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqWbErK2IbrwVVV67uRDajQNeE7SjkALvItpImL70g0eC2/tiuy///RbqBlSKeXV8u74LN X-Received: by 2002:aa7:d44c:: with SMTP id q12mr9309677edr.368.1610715738494; Fri, 15 Jan 2021 05:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610715738; cv=none; d=google.com; s=arc-20160816; b=p8JAorHTxjzDvoLCR2/x4MT1nDAYyV0Uiduuume9/WuBhMo4hSxl3uN9fGCaMYgISV hjUbGmak/fzM1ePc6GsiZdhJfFn7gI5p5YxhwbwHeyW5xPsh/eG+i0v3mph+XnZEauhd 02UQkf6N9MirylX5CghG8fGb3mzPKnWTToktx98jAqrkdo2QLeFR8ODn5yr+k7JHaZJ7 bqoNJT23Uk8yExMcddaYHf0AkRE4NiU+z2QyyjcFWUh+bkGTFyY7qfFkpozhNjSSLNPX +lIlioTkmH3dLBYAORiAYFZ8551ZLxdUr4193pe9KXj71fgjc+Ncu9yXUXTmH54xaOsF 7qZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XZBdj4+sFfjTQPUkprjSRiDUEHprIKwtWmqpW31vdbI=; b=ks9YaMXmP+gTGRpO/OQlluCev5d38w7tOVjmbyTD5MvtZp9NKWFupbzc9VsS2sBQfC wwwB/5APfDgVok9gjT5bR9Ij4BNrLE0umnVKczwQ0yg1rsGvljResX/nc4Onspm79xlG pzoV7gADp7+5+HpZN/uDWOBbltSNBp67qvVxMzDieeDcpNV13ElQyJzU2WEpY0YjqayY 38x2ZGHcZNH9Qge+UdRR3UszGJEVn+bsk/4S5Q9xRAJMlmox+YUAYHNn9vwOcLNAf6z/ UXZvaznTwb7wk/zW4Yn6JYpuRVXaQaxGMkg62hdheb+Lk0fwH7sxNLKkPZEq8cLcVXCH ZQsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jxCJb2ah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si4059913edr.193.2021.01.15.05.01.53; Fri, 15 Jan 2021 05:02:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jxCJb2ah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388440AbhAONBS (ORCPT + 99 others); Fri, 15 Jan 2021 08:01:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:39982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732055AbhAOMdF (ORCPT ); Fri, 15 Jan 2021 07:33:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A0D1C235F9; Fri, 15 Jan 2021 12:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610713945; bh=LcsDfsXtnt6BALebnMNStaCQLdQeJlU3QXNbuKfSNKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxCJb2ahaQzw+ZBWcKkmhhu3U127kwpkmpl69Xu0wokT9K74sJoojI4WSnO1WC8Od TD5iVWept/KVWgaZuu4ujqziUp/yXIsYWr8SQx9zKJwSEP+r/5Y9EYBKhReI1hhRKy j6NJ3hYIzYXYxnRl/AFSNZ/jF8QIyn+tVHLcYLRw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yufeng Mo , Huazhong Tan , "David S. Miller" Subject: [PATCH 4.19 02/43] net: hns3: fix the number of queues actually used by ARQ Date: Fri, 15 Jan 2021 13:27:32 +0100 Message-Id: <20210115121957.165879490@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121957.037407908@linuxfoundation.org> References: <20210115121957.037407908@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo [ Upstream commit 65e61e3c2a619c4d4b873885b2d5394025ed117b ] HCLGE_MBX_MAX_ARQ_MSG_NUM is used to apply memory for the number of queues used by ARQ(Asynchronous Receive Queue), so the head and tail pointers should also use this macro. Fixes: 07a0556a3a73 ("net: hns3: Changes to support ARQ(Asynchronous Receive Queue)") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h +++ b/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h @@ -102,7 +102,7 @@ struct hclgevf_mbx_arq_ring { #define hclge_mbx_ring_ptr_move_crq(crq) \ (crq->next_to_use = (crq->next_to_use + 1) % crq->desc_num) #define hclge_mbx_tail_ptr_move_arq(arq) \ - (arq.tail = (arq.tail + 1) % HCLGE_MBX_MAX_ARQ_MSG_SIZE) + (arq.tail = (arq.tail + 1) % HCLGE_MBX_MAX_ARQ_MSG_NUM) #define hclge_mbx_head_ptr_move_arq(arq) \ - (arq.head = (arq.head + 1) % HCLGE_MBX_MAX_ARQ_MSG_SIZE) + (arq.head = (arq.head + 1) % HCLGE_MBX_MAX_ARQ_MSG_NUM) #endif