Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3124374ybi; Thu, 18 Jul 2019 21:30:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSDki6ybpE3CrMjZVTuaEFxvIN3saKRYOEjOl/lm2x9qTnviLyRiMUXcprqXYahp2tbvaH X-Received: by 2002:a63:2355:: with SMTP id u21mr50363807pgm.205.1563510635667; Thu, 18 Jul 2019 21:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563510635; cv=none; d=google.com; s=arc-20160816; b=x11usDIkd21VGC64Je+7ssTuzMiBAL6UPXdp1FvLHii5wbcKmr4Yk0qdik7NUT94m7 PDVwwHgCezB1nef3kmAOa+V46lMmgJothNawFoYC7rUaackVEVaPfqVlJDX6LFzB0vSx xwtGbBiXtftmKwJTAo6uof5HbEHqbKBwcFMWOeTqjpuBj1mdFovsTddXMUCYoJYyR+Vb DHolu8IliRbiqFa9ZgIl0pzaNq/HfgE9fIr0cj0RrqA14cNlRSJtjyUJmU3ilf5rPhlh r6c++AFYhhjmvbh+nTxBBdJAJWLQLzyfkIqqAQ0XlTddbs69zt8pTfMpEL8rYUNDTL6X OIbQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XsJbY3FpRJA5JbGAwTbfrkRQIZ8VHox8NiZzB7fvyDI=; b=e5Bq7XdWzM1iHOo2b+z7UjmWZB8zJwsKc6dY9l3Z5LcuBNhtST1sSF0DzvM7fYe00x IWUTjXV9ObtWEPHQU2XC1+cBlhUr9ruMaVfrNyOYlgQFGbd6Ei2q05mc1wbkeAjtgj4y +R/ga4tr7yN54br/yHRdVI4QcZVv5IQ+qfSwsutW6VDKMTF8mAMhMxqTNaTg/7iD8wmj 1wOQ8xrg5ZlwuBg/au7gdCs8W0cog1R19ZJ3tfZTmeMBKVKya/tc8azgIU4N70S6nlvt 4pvVZXzOV4Erfk5uEf5aCCXCwY1Oh7sYY86cHXZdfp0HFxRmPcwKazWr3XAtYDV4ZfKF nHxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QVH3uwIy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si191174pll.377.2019.07.18.21.30.20; Thu, 18 Jul 2019 21:30:35 -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; dkim=pass header.i=@kernel.org header.s=default header.b=QVH3uwIy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732696AbfGSE3O (ORCPT + 99 others); Fri, 19 Jul 2019 00:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:38304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730603AbfGSEFo (ORCPT ); Fri, 19 Jul 2019 00:05:44 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDD7B21873; Fri, 19 Jul 2019 04:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509143; bh=ItxFliTD6WeA+ql+n36UYHQERTf9F0u/4k5yMPa57MM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QVH3uwIyovMqL7WvabH8GEOnXO7Ej3zpKXYTkn5eWDDn+/SQcP7ctlkp6UJZ5uZTr CQwGRxETQYhUHiViEz19RLCllatjghEWgYAsANvb2zqRyyYO8U75XuAIa6HzSzsbFs CKg8gXAqVadmSMxKTGu9+Mic+c91KPYP+dA74hQk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hou Zhiqiang , Lorenzo Pieralisi , Minghuan Lian , Subrahmanya Lingappa , Sasha Levin , linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 5.1 095/141] PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions Date: Fri, 19 Jul 2019 00:02:00 -0400 Message-Id: <20190719040246.15945-95-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719040246.15945-1-sashal@kernel.org> References: <20190719040246.15945-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang [ Upstream commit f7fee1b42fe4f8171a4b1cad05c61907c33c53f6 ] The inbound and outbound windows have completely separate control registers sets in the host controller MMIO space. Windows control register are accessed through an MMIO base address and an offset that depends on the window index. Since inbound and outbound windows control registers are completely separate there is no real need to use different window indexes in the inbound/outbound windows initialization routines to prevent clashing. To fix this inconsistency, change the MEM inbound window index to 0, mirroring the outbound window set-up. Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: update commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index e4a1964e1b43..387a20f3c240 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -546,7 +546,7 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) resource_size(pcie->ob_io_res)); /* memory inbound translation window */ - program_ib_windows(pcie, WIN_NUM_1, 0, MEM_WINDOW_TYPE, IB_WIN_SIZE); + program_ib_windows(pcie, WIN_NUM_0, 0, MEM_WINDOW_TYPE, IB_WIN_SIZE); /* Get the I/O and memory ranges from DT */ resource_list_for_each_entry_safe(win, tmp, &pcie->resources) { -- 2.20.1