Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2466440pxu; Mon, 14 Dec 2020 03:07:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjRa4jLVvE4Fi0XxD5ee4KgBkKXpJwebDnPRncDdxz2H4x6WQodsEgT8GVfot84kx8u+TZ X-Received: by 2002:a17:907:1004:: with SMTP id ox4mr21797610ejb.240.1607944039976; Mon, 14 Dec 2020 03:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607944039; cv=none; d=google.com; s=arc-20160816; b=JhRL9OQZXvGSxMAYIOpCmJf1HviQVonmmrBvBlKAyNyI1lkuqN3Mw1gF06NXUwqrmu FyUoYCwSHQKAeKL0kdLsd0Oh+OSDskjpr7M1p3cJ84si6gnEV39C0B2L0d57L9KWHmF0 qPr00yKRM5WMpuB36MXB6GRv/C5FRWfGgkQYQI/frhQUNAVDhBq4ZWehqA3l/98+8JbI Zjs8L0mpuIQoUj5h/oNdlUilVlGUwcPgtL7k0Rc+rLQLcJrOEKCylL6VINx/aZ57ICpb YFf+FD4crVlH734hCN7zWYK1L0wL8yjvUrmiKKSw2nmfNWdBOkblxylYUyyJew9aK8rJ PL/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gPCYc+i9Iy87r57uStW+ARtubvlgXBH6jVAjmF4IhnU=; b=AutuCgdfcML8VYS/0zjyn8atKaepzLIM+eOAwIQXKBxPWjjpNC785+3cyeH78ciEWn adFaSek3WPj0GgMQ6Ft0ROrRmPJ0fqf2gObvQtraurV6DYfWNj2Sd7uQ/PMceXwihG6y 0+lIwMEeo630FQ1qJ7TACdvjXdGtNxbCPR5lFM3J9OGptTlW2yC23A5m71uSiY5anbb5 pnMmpBM1RP4Dk18HAyxQNHCc8l4HJeCEoSy8VbisN/YGp5ms22W/yRN/JHi5w4dUloMu P7emgKRYbR5CQZzqNXGnDTLv/bxE/Yzn7EDC/JNG7r6Px2aN1hNyWLgzLJ3HJ9qtLnhW qsEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=brfsj5+b; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si5888208ejb.106.2020.12.14.03.06.56; Mon, 14 Dec 2020 03:07:19 -0800 (PST) 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=@linaro.org header.s=google header.b=brfsj5+b; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404745AbgLNKo2 (ORCPT + 99 others); Mon, 14 Dec 2020 05:44:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729223AbgLNKoW (ORCPT ); Mon, 14 Dec 2020 05:44:22 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C5D7C0613D3 for ; Mon, 14 Dec 2020 02:43:42 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id q75so14823753wme.2 for ; Mon, 14 Dec 2020 02:43:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gPCYc+i9Iy87r57uStW+ARtubvlgXBH6jVAjmF4IhnU=; b=brfsj5+b+IqlJui0vPdCHYpYP2bFYzO+1JlWfKz1weffGaprU8OkE8dqZ9gA8Ypm/0 v6+grN5KbiSQRACrcBWw1asFdDFVqF9nBu3Oa0GUPYv5yBkX67nd1ntfLcAJg0zP6PdE xlq10No04/AwJLV6O3ydkHlsjEAP4HvjVzoA+aYzj43B5E2rQHWk/Z7UGIyKRfSzOZGq LSBaHiBg/MvYDr977DGjKw/verW1+v2Q4CYL/idPu8LHXXM/r9HzNyp7TPbAOeKFlyOV 7pCIn4oa/HWqnDFni36IPva5UF+BAQ+YUV6hhDKYRIcADocHuV2u230LRwac34Cs6XGF Q/Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gPCYc+i9Iy87r57uStW+ARtubvlgXBH6jVAjmF4IhnU=; b=atkI0pjSzsFf3a8l0fik5zGnYAngphHJwUX1j60G6zEGkzfi3O8NQ6dCMPoiQR5bFK svKrChYTb57LPY00Hf1Ap859DOeudKWVHuHSKDYVFuPwpAiHEGrNBi1EtN+YxnPPMUnS AVw493DgbizEFnGorBPa7Exi1zT7XSHUHdbUJMpzkqHHnNst2U/p9t4lYF5nROkLr0Pu Z8EUXZSnIEbB4lxqLKs9AKOIJyaaAjaPYJxzDPEpseI1bzc0HWyNChQ7Xj4jch3hwiIk MpKy5lFEFSHolrc3N7ywWFfBI+rSfjk2a7ZC0WLDglSGxITyizrb3zjCgDD16ff7ZDNO 0r3w== X-Gm-Message-State: AOAM533ghi0j3usF3+P5ilYZvMGiRPUbKwu2L6q02j37fPn4VRQAeLsO L1hPo1N4DsnYYjQoJWw7QGd8CSulGnTyJ2nf X-Received: by 2002:a1c:bc57:: with SMTP id m84mr26948837wmf.163.1607942619946; Mon, 14 Dec 2020 02:43:39 -0800 (PST) Received: from holly.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id w189sm18608037wmg.31.2020.12.14.02.43.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 02:43:39 -0800 (PST) Date: Mon, 14 Dec 2020 10:43:37 +0000 From: Daniel Thompson To: Rob Herring Cc: Minghuan Lian , Mingkai Hu , Roy Zang , Lorenzo Pieralisi , Bjorn Helgaas , Jon Nettleton , linuxppc-dev , PCI , linux-arm-kernel , "linux-kernel@vger.kernel.org" , Linaro Patches Subject: Re: [RFC HACK PATCH] PCI: dwc: layerscape: Hack around enumeration problems with Honeycomb LX2K Message-ID: <20201214104337.wbvq2gvj3wi6bvzc@holly.lan> References: <20201211121507.28166-1-daniel.thompson@linaro.org> <20201211170558.clfazgoetmery6u3@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201211170558.clfazgoetmery6u3@holly.lan> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 05:05:58PM +0000, Daniel Thompson wrote: > On Fri, Dec 11, 2020 at 08:37:40AM -0600, Rob Herring wrote: > > On Fri, Dec 11, 2020 at 6:15 AM Daniel Thompson > > > BTW I noticed many other pcie-designware drivers take advantage > > > of a function called dw_pcie_wait_for_link() in their init paths... > > > but my naive attempts to add it to the layerscape driver results > > > in non-booting systems so I haven't embarrassed myself by including > > > that in the patch! > > > > You need to look at what's pending for v5.11, because I reworked this > > to be more unified. The ordering of init is also possibly changed. The > > sequence is now like this: > > > > dw_pcie_setup_rc(pp); > > dw_pcie_msi_init(pp); > > > > if (!dw_pcie_link_up(pci) && pci->ops->start_link) { > > ret = pci->ops->start_link(pci); > > if (ret) > > goto err_free_msi; > > } > > > > /* Ignore errors, the link may come up later */ > > dw_pcie_wait_for_link(pci); > > Thanks. That looks likely to fix it since IIUC dw_pcie_wait_for_link() > will end up waiting somewhat like the double check I added to > ls_pcie_link_up(). > > I'll take a look at let you know. Yes. These changes have fixed the enumeration problems for me. I tested pci/next and I cherry picked your patch series onto v5.10 and both are working well. Given this fixes a bug for me, do you think there is any scope for me to whittle down your series into patches for the stable kernels or am I likely to find too many extra bits being pulled in? Daniel.