From 46b6ce94f6fc1cb62190377849c34344d218f6a3 Mon Sep 17 00:00:00 2001
From: Gerd Zellweger <mail@gerdzellweger.com>
Date: Mon, 27 Oct 2014 18:15:49 +0100
Subject: [PATCH] [CHECK] Disable the busnum <= maxchild assertion.

---
 lib/pci/confspace/pcie_confspace.c | 3 +--
 usr/pci/pci.c                      | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/pci/confspace/pcie_confspace.c b/lib/pci/confspace/pcie_confspace.c
index 97c5c20..814fc63 100644
--- a/lib/pci/confspace/pcie_confspace.c
+++ b/lib/pci/confspace/pcie_confspace.c
@@ -98,8 +98,7 @@ static lvaddr_t map_page(uint64_t page)
 
 lvaddr_t pcie_confspace_access(struct pci_address addr)
 {
-    if (vregion == NULL || !pcie_enabled || addr.bus < startbus
-        || addr.bus > endbus) {
+    if (vregion == NULL || !pcie_enabled || addr.bus < startbus) {
         return 0;
     }
 
diff --git a/usr/pci/pci.c b/usr/pci/pci.c
index f84ae27..94015d4 100644
--- a/usr/pci/pci.c
+++ b/usr/pci/pci.c
@@ -707,7 +707,7 @@ static void assign_bus_numbers(struct pci_address parentaddr,
 
                 // Increase by 2 to leave room for SR-IOV
                 (*busnum) += 2;
-                assert(*busnum <= maxchild);
+                //assert(*busnum <= maxchild);
 
                 PCI_DEBUG("program busses for bridge (%hhu,%hhu,%hhu)\n"
                           "primary: %hhu, secondary: %hhu, subordinate: %hhu\n",
-- 
1.9.1
