aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
diff options
context:
space:
mode:
authorThanneeru Srinivasulu <tsrinivasulu@caviumnetworks.com>2015-12-02 15:36:14 +0530
committerDavid S. Miller <davem@davemloft.net>2015-12-02 15:58:50 -0500
commita7b1f535a8d45816cfe25c0fd900fc726ba5acce (patch)
tree73c7f956f5156a61de1fa83ef517c79ac9cdc87e /drivers/net/ethernet/cavium/thunder/thunder_bgx.c
parentnet: thunderx: Force to load octeon-mdio before bgx driver. (diff)
downloadlinux-dev-a7b1f535a8d45816cfe25c0fd900fc726ba5acce.tar.xz
linux-dev-a7b1f535a8d45816cfe25c0fd900fc726ba5acce.zip
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/thunder_bgx.c')
-rw-r--r--drivers/net/ethernet/cavium/thunder/thunder_bgx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
index 2574a7ea1c0e..6534b7362091 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -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);
}