From patchwork Thu Oct 16 07:52:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 400199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 601231400B6 for ; Thu, 16 Oct 2014 19:23:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbaJPIXV (ORCPT ); Thu, 16 Oct 2014 04:23:21 -0400 Received: from mail-bn1on0145.outbound.protection.outlook.com ([157.56.110.145]:62675 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751267AbaJPIXJ (ORCPT ); Thu, 16 Oct 2014 04:23:09 -0400 Received: from BN3PR0301CA0021.namprd03.prod.outlook.com (25.160.180.159) by DM2PR0301MB0861.namprd03.prod.outlook.com (25.160.215.147) with Microsoft SMTP Server (TLS) id 15.0.1049.19; Thu, 16 Oct 2014 08:23:04 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::120) by BN3PR0301CA0021.outlook.office365.com (2a01:111:e400:4000::31) with Microsoft SMTP Server (TLS) id 15.0.1054.13 via Frontend Transport; Thu, 16 Oct 2014 08:23:04 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD047.mail.protection.outlook.com (10.1.15.175) with Microsoft SMTP Server (TLS) id 15.0.1039.16 via Frontend Transport; Thu, 16 Oct 2014 08:23:04 +0000 Received: from shlinux1.ap.freescale.net (shlinux1.ap.freescale.net [10.192.225.216]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s9G8N2co027309; Thu, 16 Oct 2014 01:23:03 -0700 Received: by shlinux1.ap.freescale.net (Postfix, from userid 1003) id ECB591AE208; Thu, 16 Oct 2014 15:52:46 +0800 (CST) From: Richard Zhu To: CC: , , , , Richard Zhu , Richard Zhu Subject: [PATCH v6 06/13] PCI: designware: Fix one potential assignment error of cfg start Date: Thu, 16 Oct 2014 15:52:36 +0800 Message-ID: <1413445963-24706-7-git-send-email-richard.zhu@freescale.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1413445963-24706-1-git-send-email-richard.zhu@freescale.com> References: <1413445963-24706-1-git-send-email-richard.zhu@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(87936001)(81156004)(92726001)(88136002)(89996001)(52956003)(85852003)(93916002)(106466001)(105586002)(80022003)(77096002)(102836001)(104166001)(26826002)(62966002)(92566001)(45336002)(2351001)(110136001)(47776003)(50986999)(20776003)(42186005)(31966008)(107046002)(76176999)(33646002)(16796002)(64706001)(77156001)(85306004)(229853001)(36756003)(97736003)(21056001)(76482002)(103686003)(50466002)(50226001)(4396001)(84676001)(99396003)(68736004)(101416001)(95666004)(19580405001)(120916001)(46386002)(87286001)(46102003)(19580395003)(69596002)(44976005)(48376002)(6806004)(90966001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB0861; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:0; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0861; X-Forefront-PRVS: 036614DD9C Received-SPF: None (protection.outlook.com: shlinux1.ap.freescale.net does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 192.88.158.2) smtp.mailfrom=r65037@shlinux1.ap.freescale.net; X-OriginatorOrg: freescale.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Richard Zhu if va_cfg0_base/va_cfg1_base are initialized by designware core, the pp->cfg.start is not initialized properly, when IORESOURCE_MEM "config" is represented as cfg space resource. solution: assign cfg_res->start to pp->cfg.start. Signed-off-by: Richard Zhu --- drivers/pci/host/pcie-designware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 1a2b477..3edd94d 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -450,6 +450,7 @@ int __init dw_pcie_host_init(struct pcie_port *pp) if (cfg_res) { pp->config.cfg0_size = resource_size(cfg_res)/2; pp->config.cfg1_size = resource_size(cfg_res)/2; + pp->cfg.start = cfg_res->start; pp->cfg0_base = cfg_res->start; pp->cfg1_base = cfg_res->start + pp->config.cfg0_size;