From patchwork Tue Sep 11 00:19:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 182979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 393F72C008A for ; Tue, 11 Sep 2012 10:20:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753696Ab2IKAT6 (ORCPT ); Mon, 10 Sep 2012 20:19:58 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:44691 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886Ab2IKAT6 (ORCPT ); Mon, 10 Sep 2012 20:19:58 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8B0Jpid009502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Sep 2012 00:19:52 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8B0JpMT020896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Sep 2012 00:19:51 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8B0JoRu019398; Mon, 10 Sep 2012 19:19:50 -0500 Received: from linux-siqj.site (/10.132.126.191) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Sep 2012 17:19:50 -0700 From: Yinghai Lu To: Bjorn Helgaas Cc: VL , linux-pci@vger.kernel.org, Yinghai Lu , stable@vger.kernel.org Subject: [PATCH] PCI: Check bridge secondary/subordinate bus register Date: Mon, 10 Sep 2012 17:19:33 -0700 Message-Id: <1347322773-32283-1-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Intel DP43BF requires "pci=assign-busses" to discover some devices. It turns out BIOS set the bridge 00:1e.0 bus register wrong. Try to check that wrong range and reject so next pass could only assign bus for that bridge. https://bugzilla.kernel.org/show_bug.cgi?id=18412 Reported-by: VL Tested-by: VL Signed-off-by: Yinghai Lu Cc: stable@vger.kernel.org --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 3cdba8b..a8f1bf6 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -729,7 +729,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, /* Check if setup is sensible at all */ if (!pass && - (primary != bus->number || secondary <= bus->number)) { + (primary != bus->number || secondary <= bus->number || + secondary > subordinate)) { dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n"); broken = 1; }