From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751969AbZKOHsQ (ORCPT ); Sun, 15 Nov 2009 02:48:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751817AbZKOHsP (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 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org so use correct allocation from BIOS, instead of later assign another one. Signed-off-by: Yinghai Lu --- arch/x86/pci/i386.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;