From patchwork Tue Sep 30 09:36:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 5001771 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 DA58FBEEA6 for ; Tue, 30 Sep 2014 10:07:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B9522017D for ; Tue, 30 Sep 2014 10:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 558D2201B4 for ; Tue, 30 Sep 2014 10:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbaI3KHP (ORCPT ); Tue, 30 Sep 2014 06:07:15 -0400 Received: from mail-by2on0109.outbound.protection.outlook.com ([207.46.100.109]:28351 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752047AbaI3KHK (ORCPT ); Tue, 30 Sep 2014 06:07:10 -0400 Received: from BL2PR03MB340.namprd03.prod.outlook.com (10.141.68.24) by BL2PR03MB338.namprd03.prod.outlook.com (10.141.68.18) with Microsoft SMTP Server (TLS) id 15.0.1044.7; Tue, 30 Sep 2014 10:07:08 +0000 Received: from CO2PR03CA0024.namprd03.prod.outlook.com (10.141.194.151) by BL2PR03MB340.namprd03.prod.outlook.com (10.141.68.24) with Microsoft SMTP Server (TLS) id 15.0.1044.7; Tue, 30 Sep 2014 10:07:07 +0000 Received: from BL2FFO11FD025.protection.gbl (2a01:111:f400:7c09::110) by CO2PR03CA0024.outlook.office365.com (2a01:111:e400:1414::23) with Microsoft SMTP Server (TLS) id 15.0.1039.15 via Frontend Transport; Tue, 30 Sep 2014 10:07:06 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD025.mail.protection.outlook.com (10.173.161.104) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 30 Sep 2014 10:07:06 +0000 Received: from shlinux1.ap.freescale.net (shlinux1.ap.freescale.net [10.192.225.216]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s8UA73cq011221; Tue, 30 Sep 2014 03:07:05 -0700 Received: by shlinux1.ap.freescale.net (Postfix, from userid 1003) id DE03D1AE208; Tue, 30 Sep 2014 17:36:44 +0800 (CST) From: Richard Zhu To: CC: , , , , , Richard Zhu Subject: [PATCH v4 05/10] PCI: designware: fix one potential assignment error of cfg start Date: Tue, 30 Sep 2014 17:36:39 +0800 Message-ID: <1412069804-17162-6-git-send-email-r65037@freescale.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1412069804-17162-1-git-send-email-r65037@freescale.com> References: <1412069804-17162-1-git-send-email-r65037@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(199003)(189002)(42186005)(77096002)(36756003)(50466002)(21056001)(2351001)(107046002)(105586002)(87936001)(68736004)(26826002)(102836001)(106466001)(87286001)(84676001)(110136001)(77156001)(95666004)(229853001)(20776003)(64706001)(103686003)(47776003)(33646002)(104166001)(76176999)(45336002)(85306004)(97736003)(120916001)(50986999)(46102003)(46386002)(99396003)(80022003)(19580405001)(16796002)(85852003)(4396001)(6806004)(50226001)(52956003)(62966002)(92566001)(48376002)(19580395003)(76482002)(10300001)(31966008)(44976005)(88136002)(93916002)(89996001)(101416001)(92726001)(90966001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB340; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:0; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB340; X-Exchange-Antispam-Report-Test: UriScan:; X-Forefront-PRVS: 0350D7A55D 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.168.50) smtp.mailfrom=r65037@shlinux1.ap.freescale.net; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB338; 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=-7.6 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 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 ae1e6c5..f1f127f 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -444,6 +444,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;