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: <1c11a5c2-32be-85ec-cb0f-270cb5ad9576@nvidia.com>
Date:   Tue, 8 Jun 2021 16:08:06 +0530
From:   Vidya Sagar <vidyas@...dia.com>
To:     Om Prakash Singh <omp@...dia.com>, <kw@...ux.com>,
        <helgaas@...nel.org>, <lorenzo.pieralisi@....com>,
        <bhelgaas@...gle.com>, <thierry.reding@...il.com>,
        <jonathanh@...dia.com>
CC:     <linux-tegra@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kthota@...dia.com>,
        <mmaddireddy@...dia.com>
Subject: Re: [PATCH V2 3/5] PCI: tegra: Disable interrupts before entering L2



On 6/6/2021 1:52 PM, Om Prakash Singh wrote:
> In suspend_noirq() call if link doesn't goto L2, PERST# is asserted
> to bring link to detect state. However, this is causing surprise
> link down AER error. Since Kernel is executing noirq suspend calls,
> AER interrupt is not processed. PME and AER are shared interrupts
> and PCIe subsystem driver enables wake capability of PME irq during
> suspend. So this AER will cause suspend failure due to pending
> AER interrupt.
> 
> After PCIe link is in L2, interrupts are not expected since PCIe
> controller will be in reset state. Disable PCIe interrupts before
> going to L2 state to avoid pending AER interrupt.
> 
> Signed-off-by: Om Prakash Singh <omp@...dia.com>
> ---
> 
> Changes in V2:
> 	- Rephrase the commit message as per comment from Krzysztof WilczyƄski
> 
>   drivers/pci/controller/dwc/pcie-tegra194.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 66e00b276cd3..64ec0da31b5b 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1593,6 +1593,16 @@ static void tegra_pcie_dw_pme_turnoff(struct tegra_pcie_dw *pcie)
>   		return;
>   	}
>   
> +	/*
> +	 * 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.
> +	 */
> +	appl_writel(pcie, 0x0, APPL_INTR_EN_L0_0);
> +
>   	if (tegra_pcie_try_link_l2(pcie)) {
>   		dev_info(pcie->dev, "Link didn't transition to L2 state\n");
>   		/*
> 
Acked-by: Vidya Sagar <vidyas@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ