diff options
author | Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com> | 2015-12-02 15:36:14 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-02 15:58:50 -0500 |
commit | a7b1f535a8d45816cfe25c0fd900fc726ba5acce (patch) | |
tree | 73c7f956f5156a61de1fa83ef517c79ac9cdc87e /drivers/net/ethernet/cavium/thunder/nic_main.c | |
parent | 723cda5b055851f5e8bf61aacd8008c43c99e801 (diff) | |
download | linux-a7b1f535a8d45816cfe25c0fd900fc726ba5acce.tar.bz2 |
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: Thanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com>
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/nic_main.c')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nic_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c index c561fdcb79a7..cfc24a1daff1 100644 --- a/drivers/net/ethernet/cavium/thunder/nic_main.c +++ b/drivers/net/ethernet/cavium/thunder/nic_main.c @@ -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); } |