All of lore.kernel.org
 help / color / mirror / Atom feed
* How to trace down if PCIe link went into L1 state
@ 2017-05-31 21:00 Waldemar Rymarkiewicz
  2017-06-01 16:50 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Rymarkiewicz @ 2017-05-31 21:00 UTC (permalink / raw)
  To: linux-pci

Hi,

I am not really familiar with pci subsystem but I need to check if the
pcie link went into L1 state after suspend.

I use a wifi card with M2 connector with pcie interface. I suspend the
system and would like to verify if the link state went really into
L1/L2 as I see quite a big current on the power lines when it's in a
suspend.

Thanks,
/Waldek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to trace down if PCIe link went into L1 state
  2017-05-31 21:00 How to trace down if PCIe link went into L1 state Waldemar Rymarkiewicz
@ 2017-06-01 16:50 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-06-01 16:50 UTC (permalink / raw)
  To: Waldemar Rymarkiewicz; +Cc: linux-pci, linux-pm

[+cc linux-pm]

On Wed, May 31, 2017 at 11:00:16PM +0200, Waldemar Rymarkiewicz wrote:
> Hi,
> 
> I am not really familiar with pci subsystem but I need to check if the
> pcie link went into L1 state after suspend.
> 
> I use a wifi card with M2 connector with pcie interface. I suspend the
> system and would like to verify if the link state went really into
> L1/L2 as I see quite a big current on the power lines when it's in a
> suspend.

If I understand correctly, no Linux code is executing while the system
is suspended, so I think you would need a hardware analyzer to verify
the link state directly.

Per sec 5.3.2 of the PCIe spec r3.1, the power management state of a
link is determined by the D-state of its downstream component, and the
config write to PMCSR to change the D-state is what starts the
transition of the downstream component to D1, D2, etc., and transition
of the link to L1, L2, etc.  So you may be able to instrument the
kernel to log those writes and infer that the link *should* be in
L1/L2.  Of course, you're suspending the system, so you're probably
going to suspend your console device, too.  I don't know what
techniques people use to debug things in this area, other than using a
serial console.

Maybe the wifi card is a wakeup device and that prevents it from
sleeping as deeply as you expect?

Bjorn

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-01 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 21:00 How to trace down if PCIe link went into L1 state Waldemar Rymarkiewicz
2017-06-01 16:50 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.