提交 a7b1f535 编写于 作者: T Thanneeru Srinivasulu 提交者: David S. Miller

net: thunderx: Wait for delayed work to finish before destroying it

While VNIC or BGX driver teardown, wait for already scheduled delayed work to
finish before destroying it.
Signed-off-by: NThanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com>
Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 723cda5b
......@@ -1074,8 +1074,7 @@ static void nic_remove(struct pci_dev *pdev)
if (nic->check_link) {
/* Destroy work Queue */
cancel_delayed_work(&nic->dwork);
flush_workqueue(nic->check_link);
cancel_delayed_work_sync(&nic->dwork);
destroy_workqueue(nic->check_link);
}
......
......@@ -695,8 +695,7 @@ static void bgx_lmac_disable(struct bgx *bgx, u8 lmacid)
lmac = &bgx->lmac[lmacid];
if (lmac->check_link) {
/* Destroy work queue */
cancel_delayed_work(&lmac->dwork);
flush_workqueue(lmac->check_link);
cancel_delayed_work_sync(&lmac->dwork);
destroy_workqueue(lmac->check_link);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册