[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230616191056.GA30821@wunner.de>
Date: Fri, 16 Jun 2023 21:10:56 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Krzysztof Wilczy??ski <kw@...ux.com>,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Stefan Mätje <stefan.maetje@....eu>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Matthew Garrett <mjg59@...f.ucam.org>,
Shaohua Li <shaohua.li@...el.com>,
Thomas Renninger <trenn@...e.de>,
Greg Kroah-Hartman <gregkh@...e.de>,
linux-kernel@...r.kernel.org,
Dean Luick <dean.luick@...nelisnetworks.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v2 3/9] PCI/ASPM: Use RMW accessors for changing LNKCTL
On Wed, May 17, 2023 at 01:52:29PM +0300, Ilpo Järvinen wrote:
> Don't assume that the device is fully under the control of ASPM and use
> RMW capability accessors which do proper locking to avoid losing
> concurrent updates to the register values.
>
> If configuration fails in pcie_aspm_configure_common_clock(), the
> function attempts to restore the old PCI_EXP_LNKCTL_CCC settings. Store
> only the old PCI_EXP_LNKCTL_CCC bit for the relevant devices rather
> than the content of the whole LNKCTL registers. It aligns better with
> how pcie_lnkctl_clear_and_set() expects its parameter and makes the
> code more obvious to understand.
[...]
> @@ -224,17 +223,14 @@ static bool pcie_retrain_link(struct pcie_link_state *link)
> if (!pcie_wait_for_retrain(parent))
> return false;
>
> - pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16);
> - reg16 |= PCI_EXP_LNKCTL_RL;
> - pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
> + pcie_capability_set_word(parent, PCI_EXP_LNKCTL, PCI_EXP_LNKCTL_RL);
> if (parent->clear_retrain_link) {
This and several other RMW operations in drivers/pci/pcie/aspm.c
are touched by commit b1689799772a ("PCI/ASPM: Use distinct local
vars in pcie_retrain_link()") which got applied to pci/enumeration
this week:
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=enumeration&id=b1689799772a6f4180f918b0ff66e264a3db9796
As a result the $SUBJECT_PATCH no longer applies cleanly and needs
to be respun.
Thanks,
Lukas
Powered by blists - more mailing lists