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: 5842051 Return-Path: X-Original-To: patchwork-linux-arm@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 2DBD4BF440 for ; Tue, 17 Feb 2015 23:16:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 624E7201DD for ; Tue, 17 Feb 2015 23:16:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B6E92017E for ; Tue, 17 Feb 2015 23:16:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNrLa-0006go-IO; Tue, 17 Feb 2015 23:14:30 +0000 Received: from exprod5og123.obsmtp.com ([64.18.0.198] helo=mail-pd0-f172.google.com) by bombadil.infradead.org with smtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNrLN-0006Kn-LW for linux-arm-kernel@lists.infradead.org; Tue, 17 Feb 2015 23:14:18 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) (using TLSv1) by exprod5ob123.postini.com ([64.18.4.12]) with SMTP ID DSNKVOPLMhM/CPBVkRyNTV+RhBilL6wX3PYb@postini.com; Tue, 17 Feb 2015 15:14:17 PST Received: by pdjg10 with SMTP id g10so47174301pdj.1 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=aackMdM4/dMMNiBp5v7b+bkWFn1nLWGfF6qc393lsU08Zq2gkJbtwQXP7DutUM08gV dCbQkiTMCeycLuANf+UnUocSAQVtUhX1WV0R06tm7O3XyGMBmje8nG7skOYjFzYVVpGU WI4CnLyw/USov2Eo7f8jvrLkLiPj3wn8lfFkioLkhv4RoS00Iq9HvCWBZ/85FJ0iF+/P aXECAIrEzE5t19vGveqxulPBzH8/grL6lu5pzVKiLWGB+pRic9RRifo3z9nUI2MjroPt qF/7M2y1pDpAArr/FJQ42F1Q0fT0yyP34OkHJ74fdTcWRjdp55ulvVSkoaNtMO4rKsE3 ntMQ== X-Gm-Message-State: ALoCoQmlvQH6YY42qjaNB+9k3HppXnkrEFs4vqizKissNULoOn7RMyyBToWFZAQRpB+Gw0bUlij1F98fCgMt+RUnjnSDxHOG76Jr+NOS8Ti0I8kwyKTSreNuJxFHi7DuoovQPKy8rUhJY1S4sDV9joenB+xesoRUZl4ju0ghaV+gK2g1XeA4tK8= X-Received: by 10.68.202.194 with SMTP id kk2mr52491736pbc.41.1424214833848; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150217_151417_783376_C4099C2C X-CRM114-Status: GOOD ( 10.67 ) X-Spam-Score: -2.3 (--) Cc: Feng Kan X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 = {