Re: rtsx_pci not restoring ASPM state after suspend/resume

From: Bjorn Helgaas
Date: Fri Jul 24 2020 - 19:13:16 EST


On Fri, Jul 24, 2020 at 07:16:26AM +0000, åææ Ricky wrote:
> Hi James, Bjorn,
>
> The Card reader(10ec:5287) is a combo chip with Ethernet(10ec:8168),
> we think it is not cause by setting our device config space in idle
> time.
>
> We dis/enable the ASPM(setting config space) at busy/idle time, it
> can make our R/W performances well not a work around function
>
> PCI Host and Device setting self config space and do handshaking, we
> think it does not affect the system

Are you able to reproduce the problem? Specifically, James observes
that before suspend, ASPM L1 is enabled, but after resume, L0s and L1
are enabled. The ASPM state should be the same after resume.

See:

https://bugzilla.kernel.org/show_bug.cgi?id=208117#c8
https://bugzilla.kernel.org/show_bug.cgi?id=208117#c9

James *is* manually enabling ASPM L1 via a udev rule, which
complicates things a little. The sysfs link/l1_aspm functionality
he's using is new and could well be buggy.

Maybe we should simplify this a little bit more. James, if you don't
touch ASPM config at all, either manually or via udev, does the ASPM
configuration stay the same across suspend/resume?

> > -----Original Message-----
> > From: Bjorn Helgaas [mailto:helgaas@xxxxxxxxxx]
> > Sent: Friday, July 24, 2020 1:13 AM
> > To: åææ Ricky; Rui Feng
> > Cc: Arnd Bergmann; Greg Kroah-Hartman; James Ettle; Len Brown; Puranjay
> > Mohan; linux-pci@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Jacopo De
> > Simoi
> > Subject: Re: rtsx_pci not restoring ASPM state after suspend/resume
> >
> > [+cc Jacopo]
> >
> > On Thu, Jul 23, 2020 at 11:56:22AM -0500, Bjorn Helgaas wrote:
> > > James reported this issue with rtsx_pci; can you guys please take a
> > > look at it? https://bugzilla.kernel.org/show_bug.cgi?id=208117
> > >
> > > There's a lot of good info in the bugzilla already.
> >
> > Likely duplicate: https://bugzilla.kernel.org/show_bug.cgi?id=198951
> >
> > Jacopo, could you please attach a complete dmesg log and "sudo lspci
> > -vvxxxx" output to your bugzilla?
> >
> > ------Please consider the environment before printing this e-mail.