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]
Message-ID: <20210527121310.GC213718@rocinante.localdomain>
Date:   Thu, 27 May 2021 14:13:10 +0200
From:   Krzysztof WilczyƄski <kw@...ux.com>
To:     Om Prakash Singh <omp@...dia.com>
Cc:     vidyas@...dia.com, lorenzo.pieralisi@....com, bhelgaas@...gle.com,
        thierry.reding@...il.com, jonathanh@...dia.com,
        linux-tegra@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, kthota@...dia.com,
        mmaddireddy@...dia.com
Subject: Re: [RESEND PATCH V1 3/5] PCI: tegra: Disable interrupts before
 entering L2

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ