devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: lorenzo.pieralisi@arm.com, manivannan.sadhasivam@linaro.org,
	bhelgaas@google.com, devicetree@vger.kernel.org,
	gustavo.pimentel@synopsys.com, helgaas@kernel.org,
	imx@lists.linux.dev, kw@linux.com, leoyang.li@nxp.com,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	mani@kernel.org, minghuan.lian@nxp.com, mingkai.hu@nxp.com,
	robh+dt@kernel.org, roy.zang@nxp.com, shawnguo@kernel.org,
	zhiqiang.hou@nxp.com
Subject: Re: [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions
Date: Fri, 28 Jul 2023 11:02:59 -0400	[thread overview]
Message-ID: <ZMPYo0AtN6peiOMR@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <ZMOE9PJ//y1ClpU+@lpieralisi>

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@nxp.com>
> > ---
> > Change from v4 to v5:

  reply	other threads:[~2023-07-28 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 21:58 [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions Frank Li
2023-07-24 21:58 ` [PATCH v5 2/2] PCI: layerscape: Add power management support for ls1028a Frank Li
2023-07-25 21:09   ` Bjorn Helgaas
2023-07-28  9:05 ` [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions Lorenzo Pieralisi
2023-07-28 15:02   ` Frank Li [this message]
2023-07-28 15:32 ` Manivannan Sadhasivam
2023-07-28 15:49   ` [PATCH v5 1/2] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitionse Frank Li
2023-07-31 13:36     ` Manivannan Sadhasivam
2023-07-31 16:54     ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMPYo0AtN6peiOMR@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=helgaas@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=kw@linux.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=minghuan.lian@nxp.com \
    --cc=mingkai.hu@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=roy.zang@nxp.com \
    --cc=shawnguo@kernel.org \
    --cc=zhiqiang.hou@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).