PCI: aardvark: Don't rely on jiffies while holding spinlock
advk_pcie_wait_pio() can be called while holding a spinlock (from pci_bus_read_config_dword()), then depends on jiffies in order to timeout while polling on PIO state registers. In the case the PIO transaction failed, the timeout will never happen and will also cause the cpu to stall. This decrements a variable and wait instead of using jiffies. Signed-off-by: NRemi Pommarel <repk@triplefau.lt> Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: NAndrew Murray <andrew.murray@arm.com> Acked-by: NThomas Petazzoni <thomas.petazzoni@bootlin.com>
Showing
想要评论请 注册 或 登录