|
@@ -68,19 +68,9 @@ static int dpc_wait_rp_inactive(struct dpc_dev *dpc)
|
|
|
|
|
|
static void dpc_wait_link_inactive(struct dpc_dev *dpc)
|
|
|
{
|
|
|
- unsigned long timeout = jiffies + HZ;
|
|
|
struct pci_dev *pdev = dpc->dev->port;
|
|
|
- struct device *dev = &dpc->dev->device;
|
|
|
- u16 lnk_status;
|
|
|
|
|
|
- pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status);
|
|
|
- while (lnk_status & PCI_EXP_LNKSTA_DLLLA &&
|
|
|
- !time_after(jiffies, timeout)) {
|
|
|
- msleep(10);
|
|
|
- pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status);
|
|
|
- }
|
|
|
- if (lnk_status & PCI_EXP_LNKSTA_DLLLA)
|
|
|
- dev_warn(dev, "Link state not disabled for DPC event\n");
|
|
|
+ pcie_wait_for_link(pdev, false);
|
|
|
}
|
|
|
|
|
|
static void dpc_work(struct work_struct *work)
|