All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: PCIe DPC not allowing for link retraining and bus re-scan
@ 2017-01-30 11:56 Gabriele Paoloni
  2017-01-30 16:14 ` Keith Busch
  2017-02-03 10:35 ` Gabriele Paoloni
  0 siblings, 2 replies; 10+ messages in thread
From: Gabriele Paoloni @ 2017-01-30 11:56 UTC (permalink / raw)
  To: keith.busch@intel.com
  Cc: linux-pci@vger.kernel.org, Linuxarm, liudongdong (C), zhangjukuo,
	Wangzhou (B)

Hi Keith

I am looking at the current DPC implementation in:
http://lxr.free-electrons.com/source/drivers/pci/pcie/pcie-dpc.c


If my understanding is correct upon an incoming DPC event
the DPC IRQ handler will:
1) stop and remove all the devices in the hierarchy under the
downstream port that raised the event
2) wait for the data link to be inactive
3) keep the downstream port status in DPC (in fact we set the DPC
   trigger status again here:
   http://lxr.free-electrons.com/source/drivers/pci/pcie/pcie-dpc.c#L55)

Now looking at the specs we have (section 6.2.10):
"After software releases the Downstream Port from DPC, the associated Link
will normally attempt to retrain. Software can use Data Link Layer State
Changed interrupts, DL_Active ERR_COR signaling, or both, to signal when 
the Link reaches the DL_Active state again"

So if my understanding is correct in the current Linux implementation
It is not possible to recover a PCIe hierarchy from a DPC event, is it correct?
If this is correct, shouldn't we change the current implementation to release
the port from DPC and re-scan the secondary bus after the conditions described
in "PCIe 3.1 section 6.2.10" are met (I.e. <<Data Link Layer Link Active bit in
the 15 Link Status register reads 0b>> and if it is a root port also <<until
the DPC RP Busy bit reads 0b>>) ?  


Many Thanks

Gab

 

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

end of thread, other threads:[~2017-02-04  6:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30 11:56 Question: PCIe DPC not allowing for link retraining and bus re-scan Gabriele Paoloni
2017-01-30 16:14 ` Keith Busch
2017-01-31  9:35   ` Gabriele Paoloni
2017-01-31 15:53     ` Keith Busch
2017-01-31 16:59       ` Gabriele Paoloni
2017-02-02 23:22         ` Keith Busch
2017-02-03  8:26           ` Gabriele Paoloni
2017-02-03 10:35 ` Gabriele Paoloni
2017-02-03 20:52   ` Keith Busch
2017-02-04  6:29     ` Gabriele Paoloni

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.