linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Sasha Levin <sashal@kernel.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Wolfram Sang <wsa@the-dreams.de>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	linux-renesas-soc@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.14 12/32] PCI: rcar: Add L1 link state fix into data abort hook
Date: Sat, 11 Sep 2021 18:05:37 +0200	[thread overview]
Message-ID: <6cbfadee-0d74-fa4c-9ef3-a1bce55632bb@gmail.com> (raw)
In-Reply-To: <20210911131149.284397-12-sashal@kernel.org>

On 9/11/21 3:11 PM, Sasha Levin wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
> 
> [ Upstream commit a115b1bd3af0c2963e72f6e47143724c59251be6 ]
> 
> When the link is in L1, hardware should return it to L0
> automatically whenever a transaction targets a component on the
> other end of the link (PCIe r5.0, sec 5.2).
> 
> The R-Car PCIe controller doesn't handle this transition correctly.
> If the link is not in L0, an MMIO transaction targeting a downstream
> device fails, and the controller reports an ARM imprecise external
> abort.
> 
> Work around this by hooking the abort handler so the driver can
> detect this situation and help the hardware complete the link state
> transition.
> 
> When the R-Car controller receives a PM_ENTER_L1 DLLP from the
> downstream component, it sets PMEL1RX bit in PMSR register, but then
> the controller enters some sort of in-between state.  A subsequent
> MMIO transaction will fail, resulting in the external abort.  The
> abort handler detects this condition and completes the link state
> transition by setting the L1IATN bit in PMCTLR and waiting for the
> link state transition to complete.

You will also need the following patch, otherwise the build will fail on 
configurations without COMMON_CLK (none where this driver is used, but 
happened on one of the build bots). I'm waiting for PCIe maintainers to 
pick it up:
https://patchwork.kernel.org/project/linux-pci/patch/20210907144512.5238-1-marek.vasut@gmail.com/

  reply	other threads:[~2021-09-11 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210911131149.284397-1-sashal@kernel.org>
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 04/32] PCI: Add ACS quirks for NXP LX2xx0 and LX2xx2 platforms Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 06/32] PCI: tegra194: Fix handling BME_CHGED event Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 07/32] PCI: tegra194: Fix MSI-X programming Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 08/32] PCI: tegra: Fix OF node reference leak Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 10/32] PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe() Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 12/32] PCI: rcar: Add L1 link state fix into data abort hook Sasha Levin
2021-09-11 16:05   ` Marek Vasut [this message]
2021-09-20 12:12     ` Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 15/32] PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 16/32] PCI: cadence: Add quirk flag to set minimum delay in LTSSM Detect.Quiet state Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 17/32] PCI: j721e: Add PCIe support for J7200 Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 18/32] PCI: j721e: Add PCIe support for AM64 Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 19/32] PCI: Add ACS quirks for Cavium multi-function devices Sasha Levin
2021-09-11 13:11 ` [PATCH AUTOSEL 5.14 26/32] PCI: ibmphp: Fix double unmap of io_mem Sasha Levin

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=6cbfadee-0d74-fa4c-9ef3-a1bce55632bb@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    --cc=yoshihiro.shimoda.uh@renesas.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).