From patchwork Tue Oct 13 19:22:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 53511 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9DJYvIL013469 for ; Tue, 13 Oct 2009 19:35:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754523AbZJMTYg (ORCPT ); Tue, 13 Oct 2009 15:24:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761093AbZJMTWx (ORCPT ); Tue, 13 Oct 2009 15:22:53 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:43609 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934109AbZJMTWv (ORCPT ); Tue, 13 Oct 2009 15:22:51 -0400 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g4t0015.houston.hp.com (Postfix) with ESMTP id D85B78117; Tue, 13 Oct 2009 19:22:15 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g1t0039.austin.hp.com (Postfix) with ESMTP id B8AE13409E; Tue, 13 Oct 2009 19:22:15 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id A2725CF002A; Tue, 13 Oct 2009 13:22:15 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XoV+IPxjkffP; Tue, 13 Oct 2009 13:22:15 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 8B6F3CF0007; Tue, 13 Oct 2009 13:22:15 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 7815126146; Tue, 13 Oct 2009 13:22:15 -0600 (MDT) Subject: [PATCH v2 4/9] PCI: set IORESOURCE_MEM_64 before printing resource To: Jesse Barnes From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu , Joe Perches , Len Brown Date: Tue, 13 Oct 2009 13:22:15 -0600 Message-ID: <20091013192215.22336.54808.stgit@bob.kio> In-Reply-To: <20091013192040.22336.84876.stgit@bob.kio> References: <20091013192040.22336.84876.stgit@bob.kio> User-Agent: StGit/0.14.3.386.gb02d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8105e32..f760c19 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -225,7 +225,10 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { dev_err(&dev->dev, "can't handle 64-bit BAR\n"); goto fail; - } else if ((sizeof(resource_size_t) < 8) && l) { + } + + res->flags |= IORESOURCE_MEM_64; + if ((sizeof(resource_size_t) < 8) && l) { /* Address above 32-bit boundary; disable the BAR */ pci_write_config_dword(dev, pos, 0); pci_write_config_dword(dev, pos + 4, 0); @@ -240,8 +243,6 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, "64bit mmio pref" : "64bit mmio", res); } - - res->flags |= IORESOURCE_MEM_64; } else { sz = pci_size(l, sz, mask);