lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AS8PR04MB86765700A18C1F55E2C47EB78C2EA@AS8PR04MB8676.eurprd04.prod.outlook.com>
Date:   Tue, 4 Jul 2023 02:29:17 +0000
From:   Hongxing Zhu <hongxing.zhu@....com>
To:     Mark Brown <broonie@...nel.org>,
        Lucas Stach <l.stach@...gutronix.de>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>
CC:     "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] PCI: dwc: Provide deinit callback for i.MX

> -----Original Message-----
> From: Mark Brown <broonie@...nel.org>
> Sent: 2023年7月4日 0:23
> To: Hongxing Zhu <hongxing.zhu@....com>; Lucas Stach
> <l.stach@...gutronix.de>; Lorenzo Pieralisi <lpieralisi@...nel.org>; Krzysztof
> Wilczyński <kw@...ux.com>; Rob Herring <robh@...nel.org>; Bjorn Helgaas
> <bhelgaas@...gle.com>; Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>; Pengutronix Kernel Team <kernel@...gutronix.de>;
> Fabio Estevam <festevam@...il.com>; dl-linux-imx <linux-imx@....com>
> Cc: linux-pci@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> linux-kernel@...r.kernel.org; Mark Brown <broonie@...nel.org>
> Subject: [PATCH] PCI: dwc: Provide deinit callback for i.MX
> 
> The i.MX integration for the DesignWare PCI controller has a _host_exit()
> operation which undoes everything that the _host_init() operation does but does
> not wire this up as the host_deinit callback for the core, or call it in any path other
> than suspend. This means that if we ever unwind the initial probe of the device,
> for example because it fails, the regulator core complains that the regulators for
> the device were left enabled:
> 
> imx6q-pcie 33800000.pcie: iATU: unroll T, 4 ob, 4 ib, align 64K, limit 16G
> imx6q-pcie 33800000.pcie: Phy link never came up imx6q-pcie 33800000.pcie:
> Phy link never came up
> imx6q-pcie: probe of 33800000.pcie failed with error -110 ------------[ cut
> here ]------------
> WARNING: CPU: 2 PID: 46 at drivers/regulator/core.c:2396
> _regulator_put+0x110/0x128
> 
> Wire up the callback so that the core can clean up after itself.
> 
> Signed-off-by: Mark Brown <broonie@...nel.org>
Reviewed-by: Richard Zhu <hongxing.zhu@....com>
Thanks.

Best Regards
Richard Zhu

> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> index 52906f999f2b..e4942bd2598d 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1039,6 +1039,7 @@ static void imx6_pcie_host_exit(struct dw_pcie_rp
> *pp)
> 
>  static const struct dw_pcie_host_ops imx6_pcie_host_ops = {
>  	.host_init = imx6_pcie_host_init,
> +	.host_deinit = imx6_pcie_host_exit,
>  };
> 
>  static const struct dw_pcie_ops dw_pcie_ops = {
> 
> ---
> base-commit: 6995e2de6891c724bfeb2db33d7b87775f913ad1
> change-id: 20230703-pci-imx-regulator-cleanup-a17c8fd15ec5
> 
> Best regards,
> --
> Mark Brown <broonie@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ