Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp11330pxb; Fri, 15 Jan 2021 04:37:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzcNFO1T8Y2hDX7cb/sGRhdt9z5pYqXkTGWO2yVLdw2+eXyx7rYSwqwWK0Zr28EliN91X/ X-Received: by 2002:a17:906:5618:: with SMTP id f24mr8753920ejq.517.1610714252519; Fri, 15 Jan 2021 04:37:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610714252; cv=none; d=google.com; s=arc-20160816; b=hxUB77h5sgH5bcQRwaDkHo8wMkRvXq5dbdsU7hRfpm3M56qiFCAYe+Xf+TrCl8fna2 AaVMsNg4MbvFlKpwY9ZqaA68G0F2XTfdK6uppIYuGni4OCsHSeEtUFAJivXvGO+rrMGU g8ijFU6tjxsI9PRX6YRVFqqyiQAG/USlC5T0p1sE6bl6PxO1T8wZG/MmO3/CqBRU8PuW qxmj/V8xEcLEW1tGs+oJtff1cjf9MuVT+lG65V5FWf/YcyxosKy5pqXB6yKgMNMCi/YG blpeKgdSaYTS4lbSJGZp0NHRKceUuCl8cnjwiKm51zqiC5vBuymmcnbKprYx0G8D8dUr 64DA== 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=4GfZvB9H7AHUvQEmBuCqUL1YEchO1+PRWEcycobLBxY=; b=AMmZX1/mhQBGcaH672ONXkCUyY17OPr6U+vHTzfPfQsSAH+20UHPh0uUa36/8UjXFa nLnvQ1GK4vfv8QaGOjGiYGvoNaqHiiYJngkZ94gaXOhTmU7XvJ+Wvg+BdWNqtUrPt73q 9o8/kIRgAQk434Os/aB1V6jU6GGJR5u4R3XUOnyxYPJ/RY8OIy1EIXHD47PmMlzJbQvP +DLeKLKZrte7PF8PBjYnU4nMENFD9jMsLJTRHMjsAbSuzcdckCRmSVtEvL8IxTLyGrlN qrCb3Qr5btK8lCmSQrVAKuJgNB3NNPM5QqBMBaAdD0cLA8qAA2376oQx145DBcAk9g/N aowA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aw8dzCR8; 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 a19si265232eds.49.2021.01.15.04.37.09; Fri, 15 Jan 2021 04:37:32 -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=Aw8dzCR8; 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 S2387511AbhAOMek (ORCPT + 99 others); Fri, 15 Jan 2021 07:34:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:41310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387474AbhAOMe0 (ORCPT ); Fri, 15 Jan 2021 07:34:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F1F723356; Fri, 15 Jan 2021 12:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714026; bh=VkmHR2x3+vusVYtZ8umk5ZoI6i3L/56i3rJCyI0Zys4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aw8dzCR8mHVHOSUNk3vGP6Tyr+URaYOrVv6vtj2zFCRt5TE6iqfJNEwqB0Kym22Gl 1JxNwqLF9k+78WVqesfPpj9Nu+HPp0tHp/9UC3Y1RURpbi0IW/NNNGjLgo04WT7ZoU eO+OGqR8KPPKScbrLM+l49yRfqBXcuFt5ySIV0hE= 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.4 04/62] net: hns3: fix the number of queues actually used by ARQ Date: Fri, 15 Jan 2021 13:27:26 +0100 Message-Id: <20210115121958.615720918@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@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 @@ -123,7 +123,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