[DM/FIXUP] Add ms sleep for link status change
We should wait a while for success or failure after link status change or will communicate fail with the endpoint. Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
parent
1ac8044294
commit
71520fa9f1
|
@ -486,7 +486,7 @@ static void pcie_fixup_link(struct rt_pci_device *pdev)
|
|||
|
||||
if (!!(exp_lnksta & PCIEM_LINK_STA_DL_ACTIVE))
|
||||
{
|
||||
return;
|
||||
goto _status_sync;
|
||||
}
|
||||
|
||||
rt_thread_mdelay(10);
|
||||
|
@ -496,6 +496,10 @@ static void pcie_fixup_link(struct rt_pci_device *pdev)
|
|||
rt_pci_write_config_u16(pdev, pos + PCIER_LINK_CTL2, exp_lnkctl2);
|
||||
rt_pci_write_config_u16(pdev, pos + PCIER_LINK_CTL,
|
||||
exp_lnkctl | PCIEM_LINK_CTL_RETRAIN_LINK);
|
||||
|
||||
_status_sync:
|
||||
/* Wait a while for success or failure */
|
||||
rt_thread_mdelay(100);
|
||||
}
|
||||
|
||||
static rt_uint32_t pci_scan_bridge_extend(struct rt_pci_bus *bus, struct rt_pci_device *pdev,
|
||||
|
|
Loading…
Reference in New Issue