From patchwork Tue Feb 17 23:14:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Kan X-Patchwork-Id: 5841971 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4BEF1BF440 for ; Tue, 17 Feb 2015 23:13:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A9DE201F4 for ; Tue, 17 Feb 2015 23:13:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C049A201DD for ; Tue, 17 Feb 2015 23:13:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613AbbBQXN4 (ORCPT ); Tue, 17 Feb 2015 18:13:56 -0500 Received: from exprod5og105.obsmtp.com ([64.18.0.180]:57821 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753603AbbBQXNy (ORCPT ); Tue, 17 Feb 2015 18:13:54 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]) (using TLSv1) by exprod5ob105.postini.com ([64.18.4.12]) with SMTP ID DSNKVOPLMhM/CPBVkRyNTV+RhBilL6wX3PYb@postini.com; Tue, 17 Feb 2015 15:13:54 PST Received: by paceu11 with SMTP id eu11so9831920pac.7 for ; Tue, 17 Feb 2015 15:13:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=22j3qF40yZg32VZHPQfVKjmMD1BwFJNsI7FLbsj09uo=; b=XxVttOrRPkuWrdMEGIPpuR4XAfTg5V8ekRGPT54L5qO9Y8WA53huft8lo6IbndYHRa r919NLHuFMhN4VedO+OwZWN5yJqt75ubtVZwB6PmUljoBXwAhZDOvYoUkFS3Et5p4mPj 9+HAkIGFrgcIVOz9Vv8TcZ0SpQR8KK4UXpP9k6rwOsCruxY3FpPKnNO1APqAtzyq33k+ QER+dYZtTLjluEfxKoUu76fRZ7dRTCPg3wKx/49QkD5IfN005A+m9DRIcRWxnmrkHQBl j1Ik7HRm3UAHtx/oLOk3bA/hJ19PUUNQhfqQKyIcDDpP8x46P8MXqMyt7bTDjNas2jQg tqtw== X-Gm-Message-State: ALoCoQkgpwZrEItrF5q1pcOuzqb4VkZ7hSEub8JbBjcebgkerThVsoerCOmS1orCwrzD4k/kmOhDc6tYRHjjCUBbRqKcgSdJVF4Fyw2+m5oQSYRrowplWJGc5N0aDlAIl532K+6ydPCxJk4NFbJPgrbM7RJ5QnKqsA== X-Received: by 10.68.202.194 with SMTP id kk2mr52491730pbc.41.1424214833825; Tue, 17 Feb 2015 15:13:53 -0800 (PST) X-Received: by 10.68.202.194 with SMTP id kk2mr52491702pbc.41.1424214833659; Tue, 17 Feb 2015 15:13:53 -0800 (PST) Received: from fkan-lpt.amcc.com (67-207-112-226.static.wiline.com. [67.207.112.226]) by mx.google.com with ESMTPSA id n4sm18772384pdl.12.2015.02.17.15.13.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Feb 2015 15:13:53 -0800 (PST) From: Feng Kan To: patches@apm.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, robh@kernel.org, linux-arm-kernel@lists.infradead.org, tinamdar@apm.com Cc: Feng Kan Subject: [PATCH] pci: host: xgene: fix incorrectly returned address by map_bus Date: Tue, 17 Feb 2015 15:14:00 -0800 Message-Id: <1424214840-26498-1-git-send-email-fkan@apm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The generic accessor functions for pci-xgene uses map_bus call that returns the base address but did not add the additional offset. Signed-off-by: Feng Kan Acked-by: Tanmay Inamdar Acked-by: Rob Herring --- drivers/pci/host/pci-xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index aab5547..ee082c0 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -127,7 +127,7 @@ static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset) return false; } -static int xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, +static void __iomem *xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, int offset) { struct xgene_pcie_port *port = bus->sysdata; @@ -137,7 +137,7 @@ static int xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, return NULL; xgene_pcie_set_rtdid_reg(bus, devfn); - return xgene_pcie_get_cfg_base(bus); + return xgene_pcie_get_cfg_base(bus) + offset; } static struct pci_ops xgene_pcie_ops = {