Commit fa81d60
PCI: stm32: Fix LTSSM EP race with start link
If the host has deasserted PERST# and started link training before the link
is started on EP side, enabling LTSSM before the endpoint registers are
initialized in the perst_irq handler results in probing incorrect values.
Thus, wait for the PERST# level-triggered interrupt to start link training
at the end of initialization and cleanup the stm32_pcie_[start stop]_link
functions.
Fixes: 151f3d2 ("PCI: stm32-ep: Add PCIe Endpoint support for STM32MP25")
Signed-off-by: Christian Bruel <christian.bruel@foss.st.com>
[mani: added fixes tag]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: wrap line]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251114-perst_ep-v1-1-e7976317a890@foss.st.com1 parent 3a86608 commit fa81d60
1 file changed
Lines changed: 8 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 40 | | |
59 | 41 | | |
60 | 42 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 43 | | |
71 | 44 | | |
72 | 45 | | |
| |||
77 | 50 | | |
78 | 51 | | |
79 | 52 | | |
80 | | - | |
81 | | - | |
82 | 53 | | |
83 | | - | |
84 | | - | |
85 | 54 | | |
86 | 55 | | |
87 | 56 | | |
| |||
152 | 121 | | |
153 | 122 | | |
154 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
155 | 127 | | |
156 | 128 | | |
157 | 129 | | |
| |||
192 | 164 | | |
193 | 165 | | |
194 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
195 | 172 | | |
196 | 173 | | |
197 | 174 | | |
| |||
0 commit comments