Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp20131pxb; Fri, 15 Jan 2021 04:52:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxON2S0xDx8H6bepAWDDR+5SyjXUfjQLkxCC2svUdDPRQJx6xSYpFnYXwWA44Ni4tck+RAn X-Received: by 2002:a50:cf02:: with SMTP id c2mr66440edk.333.1610715170334; Fri, 15 Jan 2021 04:52:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610715170; cv=none; d=google.com; s=arc-20160816; b=xEXZfXePetUaOejwARFsj/4EQ1tvUQSe7lpPO+OZ6/V5tQmQAYqrlhDiVnhQ3QR7WA XswbSccGN6HelL+PuHKfoKaTMgmIRAC0SsqqHTQcvbdsQNKrLg8iNXoMqnTQaIKSosVZ EO3Ar6/1220ylYix/KsyvE81IU6X7+Izor3iF/hjuEvK4d5l/WNz8pU+8f8TdvhUfzUS BpWV/F43+xPS65j2Qz7hcJkmZLN9/0TkCrr5NbOrGFaniHTNFE8U7M31kQBNAccgDltO LVUuwMnehQqPpSNI45/29Byyx4n79mMjPUBDLMvc0ovICg4IyjiCmfmQtV5hhYng9NWQ 22AA== 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=qw6VSvMxTCO6d8EeHSX2bVtinn23ZBADIlrcfldjEpA=; b=uqw4EN/MYAbptQsHZVLhMe6X2LKf7Y3XLd5qporxJMMnLP7qLXoZKjzziX0TOVTkNi gzFLln7c/q5uP+3KYd/+j8mymRUN7AMHsAqCIpxxi4vhKXzakoyaYvzUnN7IB0L5HGbK lCTiolE9iiCzeGBp7HesF16XOr4O9MAyMqBcgi3HJ41Hp0D2M7SBWoSKhxM0GQs3IsqM g4odtGwE//kE2l9OM470+9EEuNIKA/tIhG1T/ASVU1jH8gH6t9rFHlufXaueBkeqYz+T XgWAati9TptIKSb9mOvi2ORNwUDTKe78rDvpcxby0pMliLSB6mVUeJklIFCPh72c+M+t HLYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Kohgz6x3; 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 cs10si3255524ejc.200.2021.01.15.04.52.26; Fri, 15 Jan 2021 04:52:50 -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=Kohgz6x3; 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 S1733283AbhAOMtk (ORCPT + 99 others); Fri, 15 Jan 2021 07:49:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:43256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387815AbhAOMgY (ORCPT ); Fri, 15 Jan 2021 07:36:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E0DD722473; Fri, 15 Jan 2021 12:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714169; bh=sHLPx/EpPrIQ/FsHUH2NuQ4sFSHHtxrHGCW/ThE+vzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kohgz6x3PfZ32F1bRR6OjWwomYsYu7UOCw4t3iZYCBeMmofSiwl9+6E6Pu5qVR+Av v8fz64sWh4nPJpbFIWmW3VqYHSi2sq/4nvo82EhPv8VFTgnqXpwB56VID0cmI1v/9Q j8GzSWBV17W86N478QkRmEUaSV3NIrRFzkAGOrt4= 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 5.10 015/103] net: hns3: fix the number of queues actually used by ARQ Date: Fri, 15 Jan 2021 13:27:08 +0100 Message-Id: <20210115122006.783656684@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115122006.047132306@linuxfoundation.org> References: <20210115122006.047132306@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 @@ -168,7 +168,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