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] [day] [month] [year] [list]
Date:   Mon, 1 Nov 2021 01:46:35 +0000
From:   Richard Zhu <hongxing.zhu@....com>
To:     Mark Brown <broonie@...nel.org>
CC:     Francesco Dolcini <francesco.dolcini@...adex.com>,
        "l.stach@...gutronix.de" <l.stach@...gutronix.de>,
        "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
        "lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
        "jingoohan1@...il.com" <jingoohan1@...il.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: RE: [PATCH v3 3/7] PCI: imx6: Fix the regulator dump when link never
 came up


> -----Original Message-----
> From: Mark Brown <broonie@...nel.org>
> Sent: Friday, October 29, 2021 7:46 PM
> To: Richard Zhu <hongxing.zhu@....com>
> Cc: Francesco Dolcini <francesco.dolcini@...adex.com>;
> l.stach@...gutronix.de; bhelgaas@...gle.com;
> lorenzo.pieralisi@....com; jingoohan1@...il.com;
> linux-pci@...r.kernel.org; dl-linux-imx <linux-imx@....com>;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org;
> kernel@...gutronix.de
> Subject: Re: [PATCH v3 3/7] PCI: imx6: Fix the regulator dump when link
> never came up
> 
> On Fri, Oct 29, 2021 at 03:58:41AM +0000, Richard Zhu wrote:
> 
> > > The driver should undo any enables it did itself, it should not undo
> > > any enables that anything else did which means it should never be
> > > basing decisions on regulator_is_enabled().  While the regulator may
> > > not be shared in the particular board you're looking at it may be
> > > shared in other systems.
> 
> > [Richard Zhu] Understood. Thanks.
> > Can I disabled this regulator in PCIe probe failure handler without
> > the
> >  regulator_is_enabled() check?
> 
> If the driver called regulator_enable() (and that didn't return an
> error) it can always call regulator_disable() as many times as it called
> regulator_enable(), no need to check if the regulator is still enabled.
> When the driver hasn't successfully called regulator_enable() it shouldn't
> call regulator_disable() even if the regualtor is enabled.
> This means that after your driver has enabled the regulator it can just
> disable it but between the regulator_get() and regulator_enable() it
> shouldn't do that.
[Richard Zhu] Got that, thanks a lot.
BR
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ