From patchwork Mon Jun 14 17:47:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai X-Patchwork-Id: 105993 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5EHnssZ025136 for ; Mon, 14 Jun 2010 17:49:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752049Ab0FNRtx (ORCPT ); Mon, 14 Jun 2010 13:49:53 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:36330 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831Ab0FNRtx (ORCPT ); Mon, 14 Jun 2010 13:49:53 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o5EHmYim010939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Jun 2010 17:48:39 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o5E80LO1003022; Mon, 14 Jun 2010 17:48:29 GMT Received: from abhmt002.oracle.com by acsmt354.oracle.com with ESMTP id 344726231276537693; Mon, 14 Jun 2010 10:48:13 -0700 Received: from [10.6.76.26] (/10.6.76.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 14 Jun 2010 10:48:13 -0700 Message-ID: <4C166B4F.90308@oracle.com> Date: Mon, 14 Jun 2010 10:47:59 -0700 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jesse Barnes , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" CC: Bjorn Helgaas , Graham Ramsey , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Robert Richter , Harald Welte , Joseph Chan , Jiri Slaby , Hidetoshi Seto , Andrew Morton , Dominik Brodowski Subject: [PATCH -v2] x86, pci: Handle fallout pci devices with peer root bus References: <4BF40014.30303@ntlworld.com> <201005201108.07040.bjorn.helgaas@hp.com> <201006021058.57361.bjorn.helgaas@hp.com> <201006111549.05164.bjorn.helgaas@hp.com> <4C12C189.50201@oracle.com> In-Reply-To: <4C12C189.50201@oracle.com> X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090209.4C166B79.00DD:SCFMA922111,ss=1,fgs=0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 14 Jun 2010 17:49:54 +0000 (UTC) Index: linux-2.6/arch/x86/pci/bus_numa.c =================================================================== --- linux-2.6.orig/arch/x86/pci/bus_numa.c +++ linux-2.6/arch/x86/pci/bus_numa.c @@ -22,7 +22,8 @@ void x86_pci_root_bus_res_quirks(struct return; for (i = 0; i < pci_root_num; i++) { - if (pci_root_info[i].bus_min == b->number) + if (pci_root_info[i].bus_min <= b->number && + pci_root_info[i].bus_max >= b->number) break; } Index: linux-2.6/kernel/resource.c =================================================================== --- linux-2.6.orig/kernel/resource.c +++ linux-2.6/kernel/resource.c @@ -451,7 +451,7 @@ static struct resource * __insert_resour if (!first) return first; - if (first == parent) + if (first == parent || first == new) return first; if ((first->start > new->start) || (first->end < new->end))