From patchwork Sun Nov 15 07:46:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 60077 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 nAF7mcnC026897 for ; Sun, 15 Nov 2009 07:48:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751611AbZKOHsP (ORCPT ); Sun, 15 Nov 2009 02:48:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751819AbZKOHsP (ORCPT ); Sun, 15 Nov 2009 02:48:15 -0500 Received: from hera.kernel.org ([140.211.167.34]:40765 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbZKOHsO (ORCPT ); Sun, 15 Nov 2009 02:48:14 -0500 Received: from [192.168.101.10] (adsl-75-36-253-238.dsl.pltn13.sbcglobal.net [75.36.253.238]) (authenticated bits=0) by hera.kernel.org (8.14.3/8.14.3) with ESMTP id nAF7lZEe028421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Nov 2009 07:47:42 GMT Message-ID: <4AFFB1E6.9040300@kernel.org> Date: Sat, 14 Nov 2009 23:46:46 -0800 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Jesse Barnes CC: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yu Zhao , Matthew Wilcox Subject: [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Index: linux-2.6/arch/x86/pci/i386.c =================================================================== --- linux-2.6.orig/arch/x86/pci/i386.c +++ linux-2.6/arch/x86/pci/i386.c @@ -155,7 +155,9 @@ static void __init pcibios_allocate_reso for_each_pci_dev(dev) { pci_read_config_word(dev, PCI_COMMAND, &command); - for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) { + for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) { + if (idx == PCI_ROM_RESOURCE) + continue; r = &dev->resource[idx]; if (r->parent) /* Already allocated */ continue;