Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3099761ybi; Thu, 18 Jul 2019 21:01:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwk0dp5f8fbuLYCMCZczloIzOUGYGdCu4pQP9oWu5G4uW1coOZS61DYLLX9ZNOxwZjAhzhV X-Received: by 2002:a63:24a:: with SMTP id 71mr26782690pgc.273.1563508910090; Thu, 18 Jul 2019 21:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508910; cv=none; d=google.com; s=arc-20160816; b=0W3EqdEYvy5aZb6pBJXC0ZKVFJlLhMtuSqeAXNKIHUPtrVY4mtN0NGE7EY/y2ApCse uFKFzcaK14QrzKdggnJJlCSgyQkZGt3r9sOxQ9XU3yMrTvRpyyZ3rTl+xMWtIGDv97Vr 0YdEtapI5LxVOyKc5qWCVmHpoJ5oMzgYVXapXvNWX98/TaB0nGdiL60ZZibzZnpzksIl ngKejY6yB025mjPnpgBKr8ysxtmq4VgZNZTxJZ8xOzVkUQPzaytXbLJOqLrTGMFxTy30 sFTlG1JqddlfJYU0kiIzwOec6qcRYspjMiNFZgo+C51aKfnOmyoZS9PyD52lMnNUzY7o b6gA== 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=pMAen/l+fL4QkA+0Uil2rPlzZX5gFVIw/feOcu2ncHH7wrsPDkVpVA4cHzUpi20NTO TbUyujCVo7ky0G9dINOraGEn/xm2bkD6My2O6GSkcUk+p9rFBb3eayx+8iSNZMq+9vI1 b4MPAiN7xx2WlLGOfExUeruxnU635M4wTsR/MnAFLXg3H17hkdyyNn9d00ZpdIB0uoWg yB2NuQCN9BL2tsCHlSWpNvIqWJmRUs9deVIFBbRa9JnAGwE23rrdzXNkPueYkDBy3pf+ nd1f2IFkeTnFNulFADmxCdfzZPL5K29Bk+0TmQcUBhQwVRdkUw6iQOGVlqJFCP4nOtGh RhTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wTy6bbSd; 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 x8si629248pgj.322.2019.07.18.21.01.34; Thu, 18 Jul 2019 21:01:50 -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=wTy6bbSd; 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 S1727617AbfGSEAt (ORCPT + 99 others); Fri, 19 Jul 2019 00:00:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:60582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729184AbfGSEAn (ORCPT ); Fri, 19 Jul 2019 00:00:43 -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 F155821851; Fri, 19 Jul 2019 04:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508842; bh=ItxFliTD6WeA+ql+n36UYHQERTf9F0u/4k5yMPa57MM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wTy6bbSdW0ofhuG+3GgLMdNEFFaT0uSMVqJdtVsdUbD0gCRJ5A0jjRJhL+pS5aHqt OwFhTT0KfiCr30rTOlFI2ihnhQ944Ov1T8nkk/RN/t/UWoTBlRcgAcJefILdkG9UOH rNDvjexIjONYtgRPuckiyTdIgpWuUHEKZDh5pWnk= 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.2 121/171] PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions Date: Thu, 18 Jul 2019 23:55:52 -0400 Message-Id: <20190719035643.14300-121-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-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