Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp190364pxb; Mon, 25 Oct 2021 06:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjBwucW1SabRicdQx/BdGR4FLsY2sJbFdd359W9GuwKARzEHeWIgriMZKC7noF0m6tzjGQ X-Received: by 2002:a05:6402:11d1:: with SMTP id j17mr4939372edw.139.1635168498372; Mon, 25 Oct 2021 06:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635168498; cv=none; d=google.com; s=arc-20160816; b=lScC0pLXBxdS8hObtfuH1N3SdzoLAGYB/VIs31Rqq2UOdXLsslubiRUaB1TFYavd6U U+WfienCZV8h3ZWtCr3ZREB4fZ/1A6KrI2UXDPdrjJqW0LVoaMuYnjhTYdvJ5Eh5U7HH M+3FSq6Om0V83mu24TtV7p/rLMnUV73iPpw0ltHDudlmL5izQoE0QPveq4FAt1stkbt6 JhZ0mDuGW3DVE3YVeIj+AhPuk3eGCsoeP62iZ6b6plFSmCYorNtl0ktsJKlWGt5RE5SW PBIshJzvXZpbBNwWvGg8yH76cdr7U24q1YTXULpKd/6IQfArKuCgZ1GCJj0EdjFzB6Gk kZnQ== 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=cLpc2A6g1zZ5haqjcqhzZfq9ejew8gbm+4GMqjGgFQA=; b=XGlfZNxGqdxZU4Dr/wQNBLNzmeP73+AginAq69q2QsL4OLTyfgxz17ozFpt0gk0S0Y gg2v+BVrHTrYvg/AAgUTTVM1xy04lMOW0jh14JokXOHxF8mCtOS8TvO0nerAm7H8VPrq 2m5wx0pkFJ6cikfcKjR9QUfwV8XoS1FDSzRThamxI3RdRD+xpIvSoFICIgDJHdH+gB2F weffLvmsYAVEpTGQ1b0D05B6MgFCLrjLQ7cj4dTlZbPNaPXeE78Luh19aOjjPXaP0Fyi iCDA6HlTTXRnlPTkNKSyJbEJA9UXQ2yugcD+dhhkYJqgWHR9XFegh29Cx/JJIDKLFmh+ simQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=os6AxgM0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si22635511edi.576.2021.10.25.06.27.54; Mon, 25 Oct 2021 06:28:18 -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=@kernel.org header.s=k20201202 header.b=os6AxgM0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233059AbhJYL0N (ORCPT + 99 others); Mon, 25 Oct 2021 07:26:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:57490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbhJYL0M (ORCPT ); Mon, 25 Oct 2021 07:26:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 337096044F; Mon, 25 Oct 2021 11:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635161030; bh=+p7rkc0Hnr1XlWm38ovQIiGOePLW/z/cRiuHpI+hXbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=os6AxgM0IbkYIq01HavJrnq/lAQAjOur9Lv3r9w8MYwN67ieLVpN9FjfKxrJjgoOU 1i5PUoponyhOsd4mSI1ky+r1ZNmzYQN6d4pOA8p2UAL85Wrz8qDeJSiizpt/Be0Fqe tTlkxzLRztwSkvBvbYWLVvoIOrlheCW5GwppgH4vNvQoyToqAv4oR7uzbUmDBCY79l aPCs/45BOV68Y8bXKVtl8iRLS3TETOghtFnsBMjSOKohqNx3WU+RN6ioNOAB5G5wrQ Ya+ZNkhnE5AbnQv5m6HYvNwNVuQ1/r1uLgofdOegw4p5Koq9j3vQ/tF+wiYZPn+Kqh YtfOXMQj1FEOQ== Date: Mon, 25 Oct 2021 12:23:48 +0100 From: Mark Brown To: Francesco Dolcini Cc: Richard Zhu , l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, jingoohan1@gmail.com, linux-pci@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH v3 3/7] PCI: imx6: Fix the regulator dump when link never came up Message-ID: References: <1634886750-13861-1-git-send-email-hongxing.zhu@nxp.com> <1634886750-13861-4-git-send-email-hongxing.zhu@nxp.com> <20211025111312.GA31419@francesco-nb.int.toradex.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CF3LIB8sPBws0Sny" Content-Disposition: inline In-Reply-To: <20211025111312.GA31419@francesco-nb.int.toradex.com> X-Cookie: From concentrate. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --CF3LIB8sPBws0Sny Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 25, 2021 at 01:13:12PM +0200, Francesco Dolcini wrote: > Hello Richard, > please see this comment from Mark, https://lore.kernel.org/all/YXaGve1ZJq0DGZ9l@sirena.org.uk/. > > + if (imx6_pcie->vpcie > > + && regulator_is_enabled(imx6_pcie->vpcie) > 0) > > + regulator_disable(imx6_pcie->vpcie); > > return ret; I should probably also say that the check for the regulator looks buggy as well, regulators should only be optional if they can be physically absent which does not seem likely for PCI devices. If the driver is not doing something to reconfigure the hardware to account for a missing supply this is generally a big warning sign. I really don't understand why regulator support is so frequently problematic for PCI controllers. :( --CF3LIB8sPBws0Sny Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmF2k8MACgkQJNaLcl1U h9DE0Qf+JIeGIKboM2eraQaTERFYEtpEhAYiAfvGMwJeGuGFajDRoTyusV2T2/nt cShDRqgDs31/79zCMl82FADAnvoSK/U7W0+1u3OwvDyUxlZnVur56srCviCHnhqT 7iUvZGT6eeyfkFga56fRe6NIBSEYfDI2/fn2lE1tbAfGbGV0uN809p6DG98g9djP 1lBrQLeGAFdxTchlin5LTKqM5NiFRW2NP+K5XgE9bgj3gUtBMXwhBtAOOJ/TBIoz eaab9w7nqL38aHx6C+D/Ph0e/WAnIO/1lvY07ntz43PWfk94OS7hixsUS+M7FHPI hfZMtefyYkk35GlgEpKagbtnP1v91Q== =p3vs -----END PGP SIGNATURE----- --CF3LIB8sPBws0Sny--