Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752912AbZJXJ0V (ORCPT ); Sat, 24 Oct 2009 05:26:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752283AbZJXJ0U (ORCPT ); Sat, 24 Oct 2009 05:26:20 -0400 Received: from hera.kernel.org ([140.211.167.34]:46514 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751886AbZJXJ0T (ORCPT ); Sat, 24 Oct 2009 05:26:19 -0400 Message-ID: <4AE2C827.8040905@kernel.org> Date: Sat, 24 Oct 2009 02:25:59 -0700 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Jesse Barnes CC: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Ingo Molnar Subject: [PATCH] pci: only release that resource index is less than 3 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 Content-Length: 1500 Lines: 48 after | commit 308cf8e13f42f476dfd6552aeff58fdc0788e566 | | PCI: get larger bridge ranges when space is available found one of resource of peer root bus (0x00) get released from root resource. later one hotplug device can not get big range anymore. other peer root buses is ok. it turns out it is from transparent path. those resources will be used for pci bridge BAR updated. so need to limit it to 3. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/pci/setup-bus.c =================================================================== --- linux-2.6.orig/drivers/pci/setup-bus.c +++ linux-2.6/drivers/pci/setup-bus.c @@ -344,9 +344,14 @@ static struct resource *find_free_bus_re * if there is no child under that, we should release * and use it. don't need to reset it, pbus_size_* will * set it again + * need to be less 3, otherwise can not write it to + * bridge, also need to avoid releasing it from + * transparent bus path */ - if (!r->child && !release_resource(r)) - return r; + if (i < 3 && !r->child) { + if (!release_resource(r)) + return r; + } } } return NULL; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/