Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp9694pxv; Wed, 21 Jul 2021 14:02:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9oIPcPehqE6FyWP6XOQ/s35EVrTsaWVDMFzHP4T7BvH04vhpfEh1Sf0jtNEqjzFbUttTo X-Received: by 2002:a05:6e02:1947:: with SMTP id x7mr25991281ilu.85.1626901364531; Wed, 21 Jul 2021 14:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901364; cv=none; d=google.com; s=arc-20160816; b=fCHcELnyLh/rZnh/ZGq1o2T7nIHabT9vixbKIFcipPDIZxTtcfQWgKZH7aKYMFYafQ 0SJ3QWnTb+YLIu2s4iL0O/n5GU+VKoAv18J7fYiBxfbloLGu9tczK4479og9dTb6sq9Z VPdkpoIaIsGDsa4kh1L5lDKC6XHF0A7RhxXOV9KFpqAqHxof3nxLK4vGwZhcyIZC5IM1 56Vz7i/iSVF6oyl6ly7lYZnGgZJ1cr4KUr8F8d5m/PvO7I4FrXxVtiVrV19qiVTSprei D38dlFh3+JhSxNqLAR+jLUPMxzCL5Owhtx9pq0uEWsC0qprsT9pKkMAtg6DtS8o2037q GrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ShmnrtYGbhLvt22QXVCWVyM3Ev7W7+sJbBBqrGHgNQQ=; b=n0mYhNARFgzTmQLizvS1Lun31XER/UhCOtLZ081LOjRnimhW09M1lzD2+daohlsGUA OIgxn6wAi+BUJ08EtQB5N6wHhj8rEZQ01Bbjp42voHFT9dDJZlhqkbfqw+FvxtaLc2le phdOklYMsrvIpRm7xC2Fd8Axp1jRzAjyihiD5uYwTbWzwosowhIKhCKEPgU+jclQMV7T ClSqTMMmqSSnbatM3Hpje1d+wwUeekZPbvGa9mTE47yRZmSItZ8GJAGmYBLQ9jUc43CX X6H4QD0y79J+70F99LcX87VYTf4y2AaQIdxaBR0ZK8s6jiAf7Xelb1X2LLc/9+OvMfL1 b6+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rKxZB1pv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si29713585iov.104.2021.07.21.14.02.32; Wed, 21 Jul 2021 14:02:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rKxZB1pv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239866AbhGUOru (ORCPT + 99 others); Wed, 21 Jul 2021 10:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239858AbhGUOrt (ORCPT ); Wed, 21 Jul 2021 10:47:49 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A176C061575; Wed, 21 Jul 2021 08:28:25 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id n4so1578196wms.1; Wed, 21 Jul 2021 08:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ShmnrtYGbhLvt22QXVCWVyM3Ev7W7+sJbBBqrGHgNQQ=; b=rKxZB1pvS/SvuENep/NcTB0hlQLeTtAsfDdhBfWv9zZDUYMJgP9XosuhZD+dUtfYRC 3MagxQonVNhKfjtqfIMQI8CfFgaJsx+dAnvnlPiGKndkxmjGY5/teW36DS+BhOEZdXQ7 NUgPEkwnVxwQKDjQthRcKjZnAy26sBfDO0HQuyKcpx7wdUFz6L+GnmYfsxvtH2B7gubZ CgjjjK07gUA8PrSFXA1gSzVygwhxXo/EaNst+9eo/BEWxE5C0Soub1ij+SfVy7uJL7Qq XF9GGMjHH55BtOb8KOC060G7uSI3IBCHgjBSKTzuR5pPEBjvSAiuq9w5taINfQ7NciUK 0bWA== 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:mime-version :content-transfer-encoding; bh=ShmnrtYGbhLvt22QXVCWVyM3Ev7W7+sJbBBqrGHgNQQ=; b=a89WpQI/xXfOoaSuJmgrMGtRFHInQY6XDf6QjMrG2m3ypuGP9OnvjR3e7aC/s0Xny8 JoLyEoggNvBaIIWMwn7d0pasBqP3vXUlTMRmq2WFagpccEyU1oHS+rhLw9cgUurS64fH aqidUxZ/vJG/lUdVKBmUoyy/RSjzBnDE87tOIKF3CHJQtanA5FHBa225hFvhR96CtWhK G4wwrrbccyG8rV//ERRvKBNqIUXI/aL0n4SB5u/1OMGLiTdYgbEwSTbuhx0MVRLa1wRM OIvr9zbGAB50iB4Arf1VXJFUEVEB1FYvsJQbJbr9WbCzli4cBKkhmAzZzBWdtAqEeaye bSYw== X-Gm-Message-State: AOAM5301JnRW6HOp28ncA7qZ/K8EOPeTPd+6uqjVWuLDwFlSCacLbLAk X7ld9br1bz2zsa/0ukqFQbA= X-Received: by 2002:a1c:7e53:: with SMTP id z80mr1675182wmc.153.1626881303722; Wed, 21 Jul 2021 08:28:23 -0700 (PDT) Received: from chgm-pc-linux.bachmann.at ([185.67.228.2]) by smtp.gmail.com with ESMTPSA id y16sm246913wmq.1.2021.07.21.08.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 08:28:23 -0700 (PDT) From: Christian Gmeiner To: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas Cc: Christian Gmeiner , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] PCI: dwc: do not ignore link errors Date: Wed, 21 Jul 2021 17:28:21 +0200 Message-Id: <20210721152821.2967356-1-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes long boot delays of about 10 seconds. I am working on a device powered by an TI am65 SoC where we have a PCIe expansion slot. If there is no PCIe device connected I see boot delays caused by pci_host_probe(..). Signed-off-by: Christian Gmeiner --- V2: fix compile --- drivers/pci/controller/dwc/pcie-designware-host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index a608ae1fad57..ce7d3a6f9a03 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -408,8 +408,9 @@ int dw_pcie_host_init(struct pcie_port *pp) goto err_free_msi; } - /* Ignore errors, the link may come up later */ - dw_pcie_wait_for_link(pci); + ret = dw_pcie_wait_for_link(pci); + if (ret) + goto err_free_msi; bridge->sysdata = pp; -- 2.31.1