* Re: [PATCH v3] PCI/ASPM: Disable L1 before disabling L1ss
[not found] <20241022223018.GA893095@bhelgaas>
@ 2025-06-05 11:23 ` Macpaul Lin (林智斌)
2025-06-05 11:27 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Macpaul Lin (林智斌) @ 2025-06-05 11:23 UTC (permalink / raw)
To: Deren Wu (武德仁),
Johnny-CC Chang (張晋嘉),
Mingyen Hsieh (謝明諺),
Yenchia Chen (陳彥嘉),
Pablo Sun (孫毓翔), helgaas@kernel.org,
Jieyy Yang (杨洁), ajayagarwal@google.com,
sashal@kernel.org
Cc: linux-pci@vger.kernel.org,
Bear Wang (萩原惟德),
david.e.box@linux.intel.com, johan+linaro@kernel.org,
ilpo.jarvinen@linux.intel.com, sdalvi@google.com,
manivannan.sadhasivam@linaro.org,
Hanson Lin (林聖峰), hkallweit1@gmail.com,
xueshuai@linux.alibaba.com, manugautam@google.com,
stable@vger.kernel.org, bhelgaas@google.com, vidyas@nvidia.com
On Tue, 2024-10-22 at 17:30 -0500, Bjorn Helgaas wrote:
> On Mon, Oct 07, 2024 at 08:59:17AM +0530, Ajay Agarwal wrote:
> > The current sequence in the driver for L1ss update is as follows.
> >
> > Disable L1ss
> > Disable L1
> > Enable L1ss as required
> > Enable L1 if required
> >
> > With this sequence, a bus hang is observed during the L1ss
> > disable sequence when the RC CPU attempts to clear the RC L1ss
> > register after clearing the EP L1ss register. It looks like the
> > RC attempts to enter L1ss again and at the same time, access to
> > RC L1ss register fails because aux clk is still not active.
> >
> > PCIe spec r6.2, section 5.5.4, recommends that setting either
> > or both of the enable bits for ASPM L1 PM Substates must be done
> > while ASPM L1 is disabled. My interpretation here is that
> > clearing L1ss should also be done when L1 is disabled. Thereby,
> > change the sequence as follows.
> >
> > Disable L1
> > Disable L1ss
> > Enable L1ss as required
> > Enable L1 if required
> >
> > Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
>
> Applied to pci/aspm for v6.13, thank you, Ajay!
Thanks! MediaTek also found this issue will happen on some old kernel,
for example 6.11 or 6.12. would you please pick this patch also to some
stable tree?
LINK:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/pci/pcie/aspm.c?id=7447990137bf06b2aeecad9c6081e01a9f47f2aa
Thanks a lot.
Macpaul Lin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3] PCI/ASPM: Disable L1 before disabling L1ss
2025-06-05 11:23 ` [PATCH v3] PCI/ASPM: Disable L1 before disabling L1ss Macpaul Lin (林智斌)
@ 2025-06-05 11:27 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2025-06-05 11:27 UTC (permalink / raw)
To: Macpaul Lin (林智斌)
Cc: Deren Wu (武德仁),
Johnny-CC Chang (張晋嘉),
Mingyen Hsieh (謝明諺),
Yenchia Chen (陳彥嘉),
Pablo Sun (孫毓翔), helgaas@kernel.org,
Jieyy Yang (杨洁), ajayagarwal@google.com,
sashal@kernel.org, linux-pci@vger.kernel.org,
Bear Wang (萩原惟德),
david.e.box@linux.intel.com, johan+linaro@kernel.org,
ilpo.jarvinen@linux.intel.com, sdalvi@google.com,
manivannan.sadhasivam@linaro.org,
Hanson Lin (林聖峰), hkallweit1@gmail.com,
xueshuai@linux.alibaba.com, manugautam@google.com,
stable@vger.kernel.org, bhelgaas@google.com, vidyas@nvidia.com
On Thu, Jun 05, 2025 at 11:23:02AM +0000, Macpaul Lin (林智斌) wrote:
> On Tue, 2024-10-22 at 17:30 -0500, Bjorn Helgaas wrote:
> > On Mon, Oct 07, 2024 at 08:59:17AM +0530, Ajay Agarwal wrote:
> > > The current sequence in the driver for L1ss update is as follows.
> > >
> > > Disable L1ss
> > > Disable L1
> > > Enable L1ss as required
> > > Enable L1 if required
> > >
> > > With this sequence, a bus hang is observed during the L1ss
> > > disable sequence when the RC CPU attempts to clear the RC L1ss
> > > register after clearing the EP L1ss register. It looks like the
> > > RC attempts to enter L1ss again and at the same time, access to
> > > RC L1ss register fails because aux clk is still not active.
> > >
> > > PCIe spec r6.2, section 5.5.4, recommends that setting either
> > > or both of the enable bits for ASPM L1 PM Substates must be done
> > > while ASPM L1 is disabled. My interpretation here is that
> > > clearing L1ss should also be done when L1 is disabled. Thereby,
> > > change the sequence as follows.
> > >
> > > Disable L1
> > > Disable L1ss
> > > Enable L1ss as required
> > > Enable L1 if required
> > >
> > > Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
> >
> > Applied to pci/aspm for v6.13, thank you, Ajay!
>
> Thanks! MediaTek also found this issue will happen on some old kernel,
> for example 6.11 or 6.12. would you please pick this patch also to some
> stable tree?
>
> LINK:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/pci/pcie/aspm.c?id=7447990137bf06b2aeecad9c6081e01a9f47f2aa
Please submit it properly, with your signed-off-by and we will be glad
to consider it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-05 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241022223018.GA893095@bhelgaas>
2025-06-05 11:23 ` [PATCH v3] PCI/ASPM: Disable L1 before disabling L1ss Macpaul Lin (林智斌)
2025-06-05 11:27 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox