From patchwork Wed Jan 3 16:27:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 855089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ps690VWr"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="nMWGWN3e"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBc1c1R3gz9s72 for ; Thu, 4 Jan 2018 03:33:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Yw1zX/uyRlCVXRrw7ZdPj5P+hGosdBcWA66qCVPT9lc=; b=Ps690VWrglyMT2 kEsMARQ2wJQqZWNzIQY4sfZ/kkoKqCdwYK8+DrhLfiPn1Wida1qDQaYb+sGm5i18iWNT2e0k5W/7O eSwNs5zWNZhCf+bO1CnJdzHF5PD7iqib7skFdq3OLNFkm9fQiVD1rf/JtjiHz7w7S1LjE8u1G7VDx IOhhl4zpEJbcPa+1QdSQy+bX1aYstBYRaQlcBrSKN8ACulmjIR4zYUo1/aOHIg7Rg5yHIOfvN5alV dNt4FjFcerfoxIz5mxtZq1Ti+KoQtzQxkDMbFF30gvL42SSU3iVYeZJibjEfDT7bk8ivdQRTJKmg+ 2DHbWD8a4eGZnOpt/5Cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWlyg-0006ID-Tp; Wed, 03 Jan 2018 16:33:19 +0000 Received: from mail-wm0-f67.google.com ([74.125.82.67]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWlu4-00013h-T8 for lede-dev@lists.infradead.org; Wed, 03 Jan 2018 16:30:34 +0000 Received: by mail-wm0-f67.google.com with SMTP id 9so3598985wme.4 for ; Wed, 03 Jan 2018 08:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id; bh=JpppfitHmzvgCBhGe2KicaHMBN+LEOQQXGjShgbVUVQ=; b=nMWGWN3e3Ow4IeLXb+OmcPLryRWIm0YqKycw0tSL+n3/QVCLwasnvNdlIycWTvPaYk X2PiXFw6Oo/C3nIrJQJofonuwydTV/HUwBZLEfX0cBu2Hi1hnkOUMqujMIZx0iGt2aH/ HyfvDwuJIDa8jUpQrKG4rBNC/oRy6snaVHciw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JpppfitHmzvgCBhGe2KicaHMBN+LEOQQXGjShgbVUVQ=; b=B8HODtjUtLzxE3f+OqrsNH9/j2TyCWL+xSl8ISsP81daYVXPvtb1OEJG1gYJnUXkU0 kyCh5KtHs6CwBMs5JQB4az9eTmWYBNnb62qmFqU6b6Z4INY0n0pOJXb1uwH2WnXiGnOL Qf5sLtYhPYjH4B2rJvqWomzCfHTUde4dJrKMS89hM8HNNuV8lomVROuAQrWF0J5teT3V +6Fs4hPFqpgh88WfLMb3ToCt6lfakFErRoq/tqUcufatoSUmge8dzu68akv81jB0pxB1 ccxBVHS9VUsTLmH9+HUaloKKWmY6dhJdeFKaBYWpc4Q3sxZUXZolkvwqXkawQG00t8rm GyaQ== X-Gm-Message-State: AKGB3mL8UPeK2eDA63qzelkccnx/wneDv6KE+9+p3mj1DrWXs/eeDVXa 6plMpaWGgdU9FF3wp9NEwDhcyOvaRC8= X-Google-Smtp-Source: ACJfBouuyYjC85FFAYLaTyB83x5bLX4A+3FDxncw1c7X2aA0CExL84QIgD6ZFJS9yl96sBBFZE6NEw== X-Received: by 10.80.145.195 with SMTP id h3mr3478038eda.240.1514996899795; Wed, 03 Jan 2018 08:28:19 -0800 (PST) Received: from localhost.localdomain (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id h56sm884125eda.97.2018.01.03.08.28.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jan 2018 08:28:19 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Wed, 3 Jan 2018 17:27:54 +0100 Message-Id: <1514996874-14741-1-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180103_082833_953331_482F0E6F X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Note: SpamAssassin invocation failed Subject: [LEDE-DEV] [PATCH] imx6: fix pcie scanning on boot X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tharvey@gateworks.com, Koen Vandeputte , nbd@nbd.name MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Upstream commit "PCI: Do not allocate more buses than available in parent" limits the amount of busses being allocated upon scanning the PCIe bus. [1] This commit was introduced in kernel 4.9.71 This breaks PCIe scanning on the Gateworks Ventana, causing no devices to be found. Temp fix this by basically reverting the upstream commit. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux- stable.git/commit/?h=v4.9.74&id=9a4bf05126f42c2632729ab0da503021d74ed454 Signed-off-by: Koen Vandeputte --- .../imx6/patches-4.9/220-fix-pcie-scanning.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch diff --git a/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch b/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch new file mode 100644 index 0000000..351ab30 --- /dev/null +++ b/target/linux/imx6/patches-4.9/220-fix-pcie-scanning.patch @@ -0,0 +1,32 @@ +Upstream commit ("PCI: Do not allocate more buses than available in parent") +limits the amount of busses being allocated upon scanning the PCIe bus. + +This breaks PCIe scanning on the Gateworks Ventana, causing no devices to be found. + +Temp fix this by basically reverting the upstream commit. + +https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.9.74&id=9a4bf05126f42c2632729ab0da503021d74ed454 + + +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -932,8 +932,7 @@ int pci_scan_bridge(struct pci_bus *bus, + child = pci_add_new_bus(bus, dev, max+1); + if (!child) + goto out; +- pci_bus_insert_busn_res(child, max+1, +- bus->busn_res.end); ++ pci_bus_insert_busn_res(child, max+1, 0xff); + } + max++; + buses = (buses & 0xff000000) +@@ -2138,9 +2137,6 @@ unsigned int pci_scan_child_bus(struct p + if (max - bus->busn_res.start < pci_hotplug_bus_size - 1) + max = bus->busn_res.start + pci_hotplug_bus_size - 1; + +- /* Do not allocate more buses than we have room left */ +- if (max > bus->busn_res.end) +- max = bus->busn_res.end; + } + + /*