Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8502357ybl; Thu, 16 Jan 2020 18:14:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwDHBoOATwKuGSI3cvhAnxsSRYJmaIXtaIIOvlDVmTDX6GjJ9dksDz1pC+tJhfj5lwrZk18 X-Received: by 2002:aca:3255:: with SMTP id y82mr1731295oiy.41.1579227253069; Thu, 16 Jan 2020 18:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579227253; cv=none; d=google.com; s=arc-20160816; b=UaYko8/0DRuDHPW2F4t7uZyQUIRGDKiKkDfItU9c3BjGit38gSMm2to75XW8vilPlo nkdw1ljc8Cifh2rFdjPg7xUSAtFKgA43cIkW14Vs9UeB2qr3wm1vUYAY95jWvax/pSkX 0DmWvC2QIPBQBy87vt3J2Et2O66/y/DRx+uHhKeRxZBQVvIixU/XqKuOJBDQM6h6Yu7V NfmT/ALZXIj/tHJIDUgMB0v4e1U8gDCyu4inbaqpZuVleW12r/c0LRTDr9Vu5y713AHq i7O1ZVIA/iocerBvb2EgWBQBGhF2C7DvArp958abgBclx/ICL3+KI2DcgXe8RN2QYs7/ EESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=foWFNbflB20KlAlhAwFvaDzNsb+zqM0vyCJKwt7mNXQ=; b=QZ1a+7jJTrplScFiz8nT9dDfOMyHEZ2U/TJdjLi2+1k5jQG8UWZjIKtJcu0zpCp4Jf 2bgOmVtljtxkLanpqQbhMQmUwtR4sACwF4St0FS976n5WGdDU2ws7mSoAGRHSxGP2JHF HxloqxkvYPU4pzFp/1d8H3q5Tzza3djE7Jg9TB3p9Dlzhl59s+iaktpET08mlYa6X5+C wjZN+dESAX3WpIPmHQk2zkqXgEvc58JauOwn7gdlbl15RlZ9BXVYRJl6/W4SXkRpQLZC 9xbQq5r0vzX7G18ByleTDIetCg/WIGiIQ1sTEjBrsccxOAludPP3KLVU5ACnYStbHd8H mkGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1EREG5KE; 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 s20si14457448otq.28.2020.01.16.18.14.00; Thu, 16 Jan 2020 18:14:13 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=1EREG5KE; 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 S1729377AbgAPXWm (ORCPT + 99 others); Thu, 16 Jan 2020 18:22:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:50442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388399AbgAPXWf (ORCPT ); Thu, 16 Jan 2020 18:22:35 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D61120684; Thu, 16 Jan 2020 23:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579216954; bh=Wdqt4q3dgQL4m2vcqrAU819Plg9TCXVFUs4S+PXx47Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1EREG5KEuBgpSG/p6vJhY9uNpR8OlwZFugBOw7nJpx2ug4Ex8m0wFEhmfyWBg3PfA C+mz/xKEzv0otHUMmPvG5Dni0lMbp0OgDihqOw8EPXp8Ar1GRr+lFMs4BkV0Ai4h8+ 6BirF6D69zAVdmev1F9yzW0zT0shZ5fP8O4UbWJQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lijun Ou , Weihang Li , Jason Gunthorpe Subject: [PATCH 5.4 072/203] RDMA/hns: Fix to support 64K page for srq Date: Fri, 17 Jan 2020 00:16:29 +0100 Message-Id: <20200116231750.455933921@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lijun Ou commit 5c7e76fb7cb5071be800c938ebf2c475e140d3f0 upstream. SRQ's page size configuration of BA and buffer should depend on current PAGE_SHIFT, or it can't work in scenario of 64K page. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Link: https://lore.kernel.org/r/1571908917-16220-2-git-send-email-liweihang@hisilicon.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -6088,11 +6088,11 @@ static void hns_roce_v2_write_srqc(struc roce_set_field(srq_context->byte_44_idxbufpgsz_addr, SRQC_BYTE_44_SRQ_IDX_BA_PG_SZ_M, SRQC_BYTE_44_SRQ_IDX_BA_PG_SZ_S, - hr_dev->caps.idx_ba_pg_sz); + hr_dev->caps.idx_ba_pg_sz + PG_SHIFT_OFFSET); roce_set_field(srq_context->byte_44_idxbufpgsz_addr, SRQC_BYTE_44_SRQ_IDX_BUF_PG_SZ_M, SRQC_BYTE_44_SRQ_IDX_BUF_PG_SZ_S, - hr_dev->caps.idx_buf_pg_sz); + hr_dev->caps.idx_buf_pg_sz + PG_SHIFT_OFFSET); srq_context->idx_nxt_blk_addr = cpu_to_le32(mtts_idx[1] >> PAGE_ADDR_SHIFT);