From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C86C6C433E9 for ; Wed, 20 Jan 2021 15:38:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 990D1233CE for ; Wed, 20 Jan 2021 15:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733300AbhATOvu (ORCPT ); Wed, 20 Jan 2021 09:51:50 -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 >> From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E711C433E0 for ; Wed, 20 Jan 2021 14:37:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18DAE23356 for ; Wed, 20 Jan 2021 14:37:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18DAE23356 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4DLSlr1Q8lzDr4q for ; Thu, 21 Jan 2021 01:37:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=walle.cc (client-ip=176.9.125.105; helo=ssl.serverraum.org; envelope-from=michael@walle.cc; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=WZaDu7hc; dkim-atps=neutral Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DLSjS6PJHzDqZF for ; Thu, 21 Jan 2021 01:35:02 +1100 (AEDT) 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roy Zang , Lorenzo Pieralisi , Saravana Kannan , PCI , linux-kernel@vger.kernel.org, Minghuan Lian , linux-arm-kernel , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , Mingkai Hu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 >> From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66AD0C433DB for ; Wed, 20 Jan 2021 14:36:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A212221FF for ; Wed, 20 Jan 2021 14:36:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A212221FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lvC+/Ed084VMk6XY2dkvWmFGwKC8uhaz76RgfAGxqW8=; b=ClFgzWBmRrSwTGXAEKEuNbiVe ECf/Q7zVgPTFXt5s7ziM+oaGzWcIrlD+up60ZVTd8QsFDMLeY7TQ/6xiXXZE0XuBZ5U6YJdE/aZMn bfD4VyXxgnIbBCfIxvopHC8mkkejQJ4UnOPOZIHff/7OvJ9meOGbSmI1y2A02DTJUyX+y1l3ljWU1 m9gaFw2ca09RsCE9PvRf59R8njjs/UaHd4IlvWIqpbmzww/u+76yCCixNOV/ALbd5jNrBlXYzhjlt F7+FHvYNqlIHMq9uN740ilrCbSOznWDu8vY5CwsdCojCPC1iCafihk1kcMeB8Ixw7ORlGQDgkEnI/ uSQawOSdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2EZY-0005fn-2L; Wed, 20 Jan 2021 14:35:00 +0000 Received: from ssl.serverraum.org ([176.9.125.105]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2EZV-0005f6-Pg for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 14:34:58 +0000 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 Date: Wed, 20 Jan 2021 15:34:54 +0100 From: Michael Walle To: Rob Herring 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_093457_947695_155E4A4B X-CRM114-Status: GOOD ( 20.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roy Zang , Lorenzo Pieralisi , Saravana Kannan , PCI , linux-kernel@vger.kernel.org, Minghuan Lian , linux-arm-kernel , Greg Kroah-Hartman , Bjorn Helgaas , linuxppc-dev , Mingkai Hu Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel