Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4543593iog; Wed, 22 Jun 2022 00:25:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/8xscaUKk4rJS4BMDWyYDrL1oEwEFbgqHR81UamPSAD6GVPLVtBv77/XYpF5Y2Ll/UYIH X-Received: by 2002:a05:6402:4410:b0:434:f35f:132e with SMTP id y16-20020a056402441000b00434f35f132emr2422356eda.215.1655882714900; Wed, 22 Jun 2022 00:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655882714; cv=none; d=google.com; s=arc-20160816; b=lVZ/D2y+oIsM61XMWX9Co4NQwA3JTF41ZMBKFHc4zY0ipDTxU/j36iNyKDTY3ZqbYp X5MbIKxufRJbzDkZuYL9BofLS25BiVjqjn2+JJ1Zvng72OLm4rbKKHWzgY9eOkfI0hrY HpQGQPe6y9K9Vfm+pKUHqwI1Lh5bVYm5XwQJ+tMmuYDjAwJ5Ko5qL/D35Hw6YrApjXYT 0xinP02bBVCDyEU9MFEzeY9WKA91hBisRfl71Bf7eDoa2E7GmYHFN7CdK4gU4ZC3GK2I jHM932c2JhEDyi64TJGliFpybvVF/GZabZAYMX3bS4+qRp7+09JyhXgAZIYl4zD8iRWO 0waQ== 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=v9S3SyCAc27awma7BtZ4mpeaSWOE/Ft8Nzr7yWmJCfM=; b=vjKYOJp/3VRYD3o/newqfIgqmrK4JMgv6DGcu2Hgapt7YAte/pSHWApJ64gjB8OPla OXnG1qEck7/S4Wd6p6uvsXtcI/fqg9KfPe6J6nnk5B9sKQTAfkqWpjFVwdPSoZuCkLnJ 7x9Hs0g05FTEOcpnqmMXauBBv4N/NeQUkzDPxE5/Nzv3ANCMC308kqhG7xsKgjnNx2uQ QkSBuMNVRD0WDRT6U65s4fOirlJr7u45Oj+QRYCg+8DpZMqfzI6bafmLFVmsQgtOZVRa BLAnLwg8h2v5YxcU0pJgij8ApJm5nHxRd4KpNZRfJH2PBrXTtY7AM6K8lsp/HXQQvZVA X1jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RzmrczCI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he37-20020a1709073da500b00722f1da9fc7si1382816ejc.793.2022.06.22.00.24.49; Wed, 22 Jun 2022 00:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RzmrczCI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351499AbiFVGuD (ORCPT + 99 others); Wed, 22 Jun 2022 02:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351595AbiFVGt1 (ORCPT ); Wed, 22 Jun 2022 02:49:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FDE136163; Tue, 21 Jun 2022 23:49:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2D36BB81C50; Wed, 22 Jun 2022 06:49:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD321C34114; Wed, 22 Jun 2022 06:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655880563; bh=5X/2z3DnYFBTxCdVc6BnK643pFWE6202pXELvDL5LrQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RzmrczCIbl4FiR4E7XPxESCAURY5n313J2+FHmgOpuDrE2u8WSwJja01eGG+k3e3G gQAULe2ivqoYZtLua7b7530q9iqz0HXPCGjDhyYvraD61p3A6HD7S0LfDa1HJy9Ity vNjNNZu5OV/KKIKg33XRFoQhUeJJIv/VjJ7QeZpa9TTrRh4peo09HuFXwKtCQsIRxr n+/5KxDp19d9ivthUYpdMgiaVEqqe8fegkJr1rHzV5nWcCqndEbrZi5RTx2IGwVn9R gztmtakDNfyeSd/kaSnI1Gx8wpofZyg1czgtcJzCQ2U2Viw06l4bJ+t53dlyqzQgvH BlxN/2/403aWw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o3uAx-0003ON-UD; Wed, 22 Jun 2022 08:49:20 +0200 Date: Wed, 22 Jun 2022 08:49:19 +0200 From: Johan Hovold To: Bjorn Helgaas Cc: Robert Marko , svarbanov@mm-sol.com, agross@kernel.org, bjorn.andersson@linaro.org, lpieralisi@kernel.org, robh@kernel.org, kw@linux.com, bhelgaas@google.com, p.zabel@pengutronix.de, jingoohan1@gmail.com, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, johan+linaro@kernel.org Subject: Re: [PATCH v2] PCI: qcom: fix IPQ8074 Gen2 support Message-ID: References: <20220621112330.448754-1-robimarko@gmail.com> <20220621203211.GA1330530@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220621203211.GA1330530@bhelgaas> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2022 at 03:32:11PM -0500, Bjorn Helgaas wrote: > On Tue, Jun 21, 2022 at 01:23:30PM +0200, Robert Marko wrote: > > IPQ8074 has one Gen2 and one Gen3 port, currently the Gen2 port will > > cause the system to hang as its using DBI registers in the .init > > and those are only accesible after phy_power_on(). > > Is the fact that IPQ8074 has both a Gen2 and a Gen3 port relevant to > this patch? I don't see the connection. > > I see that qcom_pcie_host_init() does: > > qcom_pcie_host_init > pcie->cfg->ops->init(pcie) > phy_power_on(pcie->phy) > pcie->cfg->ops->post_init(pcie) > > and that you're moving DBI register accesses from > qcom_pcie_init_2_3_3() to qcom_pcie_post_init_2_3_3(). > > But I also see DBI register accesses in other .init() functions: > > qcom_pcie_init_2_1_0 > qcom_pcie_init_1_0_0 (oddly out of order) > qcom_pcie_init_2_3_2 > qcom_pcie_init_2_4_0 > > Why do these accesses not need to be moved? I assume it's because > pcie->phy is an optional PHY and phy_power_on() does nothing on those > controllers? At least the QMP PHY driver does not implement the PHY power_on op and instead fires everything up already at phy_init(). That may explain the difference in behaviour here. Johan