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]
Message-ID: <1538660082.3515.12.camel@pengutronix.de>
Date:   Thu, 04 Oct 2018 15:34:42 +0200
From:   Lucas Stach <l.stach@...gutronix.de>
To:     Philipp Zabel <p.zabel@...gutronix.de>,
        Leonard Crestez <leonard.crestez@....com>,
        "lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
        Richard Zhu <hongxing.zhu@....com>
Cc:     dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jingoohan1@...il.com" <jingoohan1@...il.com>,
        "gustavo.pimentel@...opsys.com" <gustavo.pimentel@...opsys.com>,
        Fabio Estevam <fabio.estevam@....com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "andrew.smirnov@...il.com" <andrew.smirnov@...il.com>,
        "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: Re: [PATCH 4/4] PCI: imx: Add PME_Turn_Off support

Am Donnerstag, den 04.10.2018, 15:25 +0200 schrieb Philipp Zabel:
> On Thu, 2018-10-04 at 13:20 +0000, Leonard Crestez wrote:
> > On Thu, 2018-10-04 at 10:59 +0200, Lucas Stach wrote:
> > > Am Montag, den 01.10.2018, 22:53 +0300 schrieb Leonard Crestez:
> > > > When the root complex suspends it must send a PME_Turn_Off TLP.
> > > > Implement this by asserting the "turnoff" reset.
> > > > 
> > > > +static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie)
> > > > +{
> > > > > > > > +	reset_control_assert(imx6_pcie->turnoff_reset);
> > > > +	reset_control_deassert(imx6_pcie->turnoff_reset);
> > > 
> > > I'm a bit surprised to see no timing requirements here. I would have
> > > expected that there is a minimum time from asserting the reset, so the
> > > turnoff message gets transmitted to the EP before the clocks are
> > > stopped.
> > 
> > According to the PCI standard after PME_Turn_Off is sent all components
> > must respond with PME_TO_Ack. There doesn't seem to be any bit exposed
> > to check if acks were received but the standard recommends a 1-10ms
> > timeout after which you should proceed anyway.
> > 
> > It seems the NXP vendor tree has an udelay(1000) which I missed, it
> > seems like an acceptable solution. Or maybe it should be msleep(10)?
> 
> Maybe usleep_range(1000, 10000) ?

Yep, we aren't in atomic context here and the timeout is relatively
short so usleep_range() looks like the correct thing to use.

Regards,
Lucas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ