linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Om Prakash Singh <omp@nvidia.com>
Cc: vidyas@nvidia.com, lorenzo.pieralisi@arm.com,
	bhelgaas@google.com, thierry.reding@gmail.com,
	jonathanh@nvidia.com, linux-tegra@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	kthota@nvidia.com, mmaddireddy@nvidia.com
Subject: Re: [RESEND PATCH V1 3/5] PCI: tegra: Disable interrupts before entering L2
Date: Thu, 27 May 2021 14:13:10 +0200	[thread overview]
Message-ID: <20210527121310.GC213718@rocinante.localdomain> (raw)
In-Reply-To: <20210527115246.20509-4-omp@nvidia.com>

Hi Prakash,

> Tegra194 implements suspend_noirq() hook and during the system suspend, the link
> is taken to L2 state after PME_Turn_off handshake and if it doesn't go into L2,
> PERST# is asserted. It is observed that with some of the endpoints (Ex:- Marvell
> SATA controller), the link doesn't go into L2 state and asserting PERST# results
> in Surprise Link Down error and the corresponding AER interrupt is also raised.
> Since the system is in noirq phase, this interrupt is not served. Both PME and
> AER interrupts are served by the same wire interrupt in Tegra194, and since the
> PCIe sub-system enables wake capability for PME interrupt, having a pending AER
> interrupt is treated as PME wake interrupt by the system and prevents the system
> going into the suspend state. To address this issue, the interrupts are disabled
> before taking the link into L2 state as the interrupts are not expected anyway
> from the controller afterward.

This commit could use some formatting, perhaps splitting it into few
paragraphs and also I believe your line length could use some
adjustment.  Having said that, I am not sure if the whole detailed
account of the problem is required to be included here in the commit
message.

> +	/*
> +	 * PCIe controller exits from L2 only if reset is applied, so
> +	 * controller doesn't handle interrupts. But in cases where
> +	 * L2 entry fails, PERST# is asserted which can trigger surprise
> +	 * link down AER. However this function call happens in
> +	 * suspend_noirq(), so AER interrupt will not be processed.
> +	 * Disable all interrupts to avoid such a scenario.
> +	 */
[...]

This code comment added below makes for a better commit message that the
commit message above - clear, concise and straight to the point of why
this was added.

	Krzysztof

  reply	other threads:[~2021-05-27 12:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 11:52 [RESEND PATCH V1 0/5] Update pcie-tegra194 driver Om Prakash Singh
2021-05-27 11:52 ` [RESEND PATCH V1 1/5] PCI: tegra: Fix handling BME_CHGED event Om Prakash Singh
2021-05-27 16:06   ` Bjorn Helgaas
2021-05-27 11:52 ` [RESEND PATCH V1 2/5] PCI: tegra: Fix MSI-X programming Om Prakash Singh
2021-05-27 12:14   ` Krzysztof Wilczyński
2021-05-27 11:52 ` [RESEND PATCH V1 3/5] PCI: tegra: Disable interrupts before entering L2 Om Prakash Singh
2021-05-27 12:13   ` Krzysztof Wilczyński [this message]
2021-05-27 11:52 ` [RESEND PATCH V1 4/5] PCI: tegra: Don't allow suspend when Tegra PCIe is in EP mode Om Prakash Singh
2021-05-27 12:05   ` Krzysztof Wilczyński
2021-05-27 21:00     ` Krzysztof Wilczyński
2021-05-27 11:52 ` [RESEND PATCH V1 5/5] PCI: tegra: Cleanup unused code Om Prakash Singh
2021-05-27 12:00 ` [RESEND PATCH V1 0/5] Update pcie-tegra194 driver Krzysztof Wilczyński
2021-05-27 12:49   ` Jon Hunter
2021-05-27 12:52     ` Krzysztof Wilczyński

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=20210527121310.GC213718@rocinante.localdomain \
    --to=kw@linux.com \
    --cc=bhelgaas@google.com \
    --cc=jonathanh@nvidia.com \
    --cc=kthota@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mmaddireddy@nvidia.com \
    --cc=omp@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=vidyas@nvidia.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).