From patchwork Mon Oct 20 05:25:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 5102581 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6FCA0C11AC for ; Mon, 20 Oct 2014 05:55:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5ACE920176 for ; Mon, 20 Oct 2014 05:55:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50BC4201BB for ; Mon, 20 Oct 2014 05:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbaJTFzs (ORCPT ); Mon, 20 Oct 2014 01:55:48 -0400 Received: from mail-by2on0118.outbound.protection.outlook.com ([207.46.100.118]:14112 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752480AbaJTFzr (ORCPT ); Mon, 20 Oct 2014 01:55:47 -0400 Received: from CO2PR03CA0052.namprd03.prod.outlook.com (10.141.194.179) by CY1PR0301MB0858.namprd03.prod.outlook.com (25.160.163.152) with Microsoft SMTP Server (TLS) id 15.0.1054.13; Mon, 20 Oct 2014 05:55:45 +0000 Received: from BL2FFO11FD018.protection.gbl (2a01:111:f400:7c09::124) by CO2PR03CA0052.outlook.office365.com (2a01:111:e400:1414::51) with Microsoft SMTP Server (TLS) id 15.0.1054.13 via Frontend Transport; Mon, 20 Oct 2014 05:55:44 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD018.mail.protection.outlook.com (10.173.161.36) with Microsoft SMTP Server (TLS) id 15.0.1049.20 via Frontend Transport; Mon, 20 Oct 2014 05:55:44 +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 s9K5tb3k017259; Sun, 19 Oct 2014 22:55:38 -0700 Received: by shlinux1.ap.freescale.net (Postfix, from userid 1003) id 73EB31AE20B; Mon, 20 Oct 2014 13:25:25 +0800 (CST) From: Richard Zhu To: CC: , , , , , Richard Zhu , Richard Zhu Subject: [PATCH v8 2/9] PCI: designware: Fix one potential assignment error of cfg start Date: Mon, 20 Oct 2014 13:25:17 +0800 Message-ID: <1413782724-30795-3-git-send-email-richard.zhu@freescale.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1413782724-30795-1-git-send-email-richard.zhu@freescale.com> References: <1413782724-30795-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)(199003)(189002)(21056001)(36756003)(50466002)(48376002)(77156001)(33646002)(97736003)(95666004)(77096002)(103686003)(4396001)(80022003)(105586002)(106466001)(46102003)(45336002)(81156004)(99396003)(46386002)(64706001)(2351001)(120916001)(47776003)(76482002)(107046002)(20776003)(229853001)(50226001)(93916002)(50986999)(76176999)(104166001)(84676001)(85306004)(42186005)(31966008)(44976005)(102836001)(101416001)(16796002)(92726001)(26826002)(62966002)(6806004)(92566001)(110136001)(19580405001)(19580395003)(85852003)(88136002)(87286001)(87936001)(69596002)(68736004)(52956003)(89996001)(90966001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB0858; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:0; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0858; X-Forefront-PRVS: 03706074BC 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 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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 8d1c809..e3cd54a 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -472,6 +472,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;