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]
Date:   Thu, 4 Oct 2018 13:20:20 +0000
From:   Leonard Crestez <leonard.crestez@....com>
To:     "l.stach@...gutronix.de" <l.stach@...gutronix.de>,
        "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>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "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

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)?

--
Regards,
Leonard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ