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:   Fri, 28 Jul 2023 11:02:59 -0400
From:   Frank Li <Frank.li@....com>
To:     Lorenzo Pieralisi <lpieralisi@...nel.org>
Cc:     lorenzo.pieralisi@....com, manivannan.sadhasivam@...aro.org,
        bhelgaas@...gle.com, devicetree@...r.kernel.org,
        gustavo.pimentel@...opsys.com, helgaas@...nel.org,
        imx@...ts.linux.dev, kw@...ux.com, leoyang.li@....com,
        linux-arm-kernel@...ts.infradead.org, linux-imx@....com,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        mani@...nel.org, minghuan.lian@....com, mingkai.hu@....com,
        robh+dt@...nel.org, roy.zang@....com, shawnguo@...nel.org,
        zhiqiang.hou@....com
Subject: Re: [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume
 functionality for L2/L3 transitions

On Fri, Jul 28, 2023 at 11:05:56AM +0200, Lorenzo Pieralisi wrote:
> On Mon, Jul 24, 2023 at 05:58:29PM -0400, Frank Li wrote:
> > Introduced helper function dw_pcie_get_ltssm to retrieve SMLH_LTSS_STATE.
> > Added API pme_turn_off and exit_from_l2 for managing L2/L3 state transitions.
> 
> Commit logs should not use the past tense but the present tense.
> 
> eg s/Introduced/Introduce
> 
> Furthermore, read this post from Bjorn and follow it to the letter
> please:
> 
> https://lore.kernel.org/linux-pci/20171026223701.GA25649@bhelgaas-glaptop.roam.corp.google.com
> 
> > 
> > Typical L2 entry workflow:
> > 
> > 1. Transmit PME turn off signal to PCI devices and wait for PME_To_Ack.
> > 2. Await link entering L2_IDLE state.
> > 3. Transition Root complex to D3 state.
> > 
> > Typical L2 exit workflow:
> > 
> > 1. Transition Root complex to D0 state.
> > 2. Issue exit from L2 command.
> > 3. Reinitialize PCI host.
> > 4. Wait for link to become active.
> 
> This does not explain what the patch does and why it does it.
> 
> Are you describing the L2 entry/exit as implemented in the code ?
Yes.

How about below commit message:

Introduce helper function dw_pcie_get_ltssm to retrieve SMLH_LTSS_STATE.

Add callback .pme_turn_off and .exit_from_l2 for platform specific PME
handle.

Add common dw_pcie_suspend(resume)_noirq() API to avoid duplicated code
in dwc pci host controller platform driver.

Typical L2 entry workflow/dw_pcie_suspend_noirq()

1. Transmit PME turn off signal to PCI devices and wait for PME_To_Ack.
2. Await link entering L2_IDLE state.
3. Transition Root complex to D3 state.

Typical L2 exit workflow/dw_pcie_resume_noirq()

1. Transition Root complex to D0 state.
2. Issue exit from L2 command.
3. Reinitialize PCI host.
4. Wait for link to become active.

Frank

> 
> > 
> > Signed-off-by: Frank Li <Frank.Li@....com>
> > ---
> > Change from v4 to v5:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ