Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp276654pxb; Wed, 20 Jan 2021 06:53:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJw98RYIyPJA/kmjmi9ORf5rdnszEHohMJkHqGEdlWJEe5bzOLg+v2bJjav2Oldh/IHFTCqV X-Received: by 2002:a17:906:6b02:: with SMTP id q2mr4625462ejr.122.1611154399013; Wed, 20 Jan 2021 06:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611154399; cv=none; d=google.com; s=arc-20160816; b=jgRvgt8rfeoRthgypK1ibQbguY8q6vzSldPXZVCyHDpVp2Jy8/30kTKP2J6Fz2nBp5 fGdziL+FJAKpbzXJj9n3s7aeQ6Duo9jIfWeibQDIUekH/jXsQ2XcLhvPJ24ft/pQZapi K/WZ5spiqBxXhvfYGspQ9MmDRBxfICKXOgtPyDuXSPeqrDHCcjgqKnyFqODnJhqv0wg0 jg+OKSFmz4wxe3/fsGkpp4w67+kpyDvifwVo8tIBm5g03qwXB1YAXZEMOHftClZPlHaa 6lEFVb03muBXrbtPnyUF4glHd337nR61gDajdJDaaKktD9x4zzatEiMhmv6spGUL+A8s Ydag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=/ErNlhMUQaNtjrr+RiOGSDOM6D+LTE0johCMOlQNCxY=; b=ez3/tFGqUlPTfqrgY841IGbmr82dOE4Isso/7UeQ3u1lGkU4aqbQHObpnb65dYJkLx DlwY/W7vqnN5EMvHt3hfuW1IiGUMTjUoWGxAwCbR/F4FS4LTia5unCTUNsltg4lUEXr0 WIeceyCX7CiuanDxkwNcGDLgFZZeCpwiYAoZ/6iXJSDKlTbV56WKN+kdLNAEz7lKimRM lZokBoGGG92FRGiU04mSgiO4ozrsBkgWhFJ+mkF6eOnoG+oYRfAimi1/UdMznEXkDTrN w0l7lDI0wqdWFxbgYfixYw49tzv80OOOqDLYOK/Ns5FhF4x5D1DjkRJaS45X9TdkxUqL D/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WZaDu7hc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si947654edg.300.2021.01.20.06.52.55; Wed, 20 Jan 2021 06:53: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=@walle.cc header.s=mail2016061301 header.b=WZaDu7hc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732847AbhATOvH (ORCPT + 99 others); Wed, 20 Jan 2021 09:51:07 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:48415 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729274AbhATOfi (ORCPT ); Wed, 20 Jan 2021 09:35:38 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id B4D2322727; Wed, 20 Jan 2021 15:34:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1611153295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/ErNlhMUQaNtjrr+RiOGSDOM6D+LTE0johCMOlQNCxY=; b=WZaDu7hc4Vc3km9qkbg5toDFDmKXGV2ULtxLkNgUTqUeQksL5QLILdCzjwaKqPU37mjFts 8nkwzttm2IkgaoRrEts68UksVlkzgav3IlfVzn3JjHLGZ+MLCABqDLAdW9+aRhIVqHyAre OU6INGrNNP7V5NiFIjrW0ZcLuJwERv8= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Jan 2021 15:34:54 +0100 From: Michael Walle To: Rob Herring Cc: linuxppc-dev , PCI , linux-arm-kernel , linux-kernel@vger.kernel.org, Minghuan Lian , Mingkai Hu , Roy Zang , Lorenzo Pieralisi , Bjorn Helgaas , Greg Kroah-Hartman , Saravana Kannan Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver() In-Reply-To: References: <20210120105246.23218-1-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <2495e985839f3b05ef5e00b58a05ecb7@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-01-20 15:23, schrieb Rob Herring: > On Wed, Jan 20, 2021 at 4:53 AM Michael Walle wrote: >> >> fw_devlink will defer the probe until all suppliers are ready. We >> can't >> use builtin_platform_driver_probe() because it doesn't retry after >> probe >> deferral. Convert it to builtin_platform_driver(). > > If builtin_platform_driver_probe() doesn't work with fw_devlink, then > shouldn't it be fixed or removed? Then we're not fixing drivers later > when folks start caring about deferred probe and devlink. > > I'd really prefer if we convert this to a module instead. (And all the > other PCI host drivers.) I briefly looked into adding a remove() op. But I don't know what will have to be undo of the ls_pcie_host_init(). That would be up to the maintainers of this driver. _But_ I'd really like to see PCI working on my board again ;) At least until the end of this development cycle. -michael >> Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default") > > This happened!? > >> Signed-off-by: Michael Walle >> --- >> drivers/pci/controller/dwc/pci-layerscape.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c >> b/drivers/pci/controller/dwc/pci-layerscape.c >> index 44ad34cdc3bc..5b9c625df7b8 100644 >> --- a/drivers/pci/controller/dwc/pci-layerscape.c >> +++ b/drivers/pci/controller/dwc/pci-layerscape.c >> @@ -232,7 +232,7 @@ static const struct of_device_id >> ls_pcie_of_match[] = { >> { }, >> }; >> >> -static int __init ls_pcie_probe(struct platform_device *pdev) >> +static int ls_pcie_probe(struct platform_device *pdev) >> { >> struct device *dev = &pdev->dev; >> struct dw_pcie *pci; >> @@ -271,10 +271,11 @@ static int __init ls_pcie_probe(struct >> platform_device *pdev) >> } >> >> static struct platform_driver ls_pcie_driver = { >> + .probe = ls_pcie_probe, >> .driver = { >> .name = "layerscape-pcie", >> .of_match_table = ls_pcie_of_match, >> .suppress_bind_attrs = true, >> }, >> }; >> -builtin_platform_driver_probe(ls_pcie_driver, ls_pcie_probe); >> +builtin_platform_driver(ls_pcie_driver); >> -- >> 2.20.1 >>