From: Dmitry Kravkov Date: Sun, 17 Nov 2013 06:59:26 +0000 (+0200) Subject: bnx2x: Clean the sp rtnl task upon unload X-Git-Tag: submit/tizen/20160607.132125~5605^2~9^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0d307b21025106157709521d5b88831530e2112;p=sdk%2Femulator%2Femulator-kernel.git bnx2x: Clean the sp rtnl task upon unload While unloading, bnx2x needs to clean the sp_rtnl_state to prevent configuration made before the unload to be applied afterwards with stale values. Signed-off-by: Dmitry Kravkov Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index dcafbda..ec96130 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -2959,6 +2959,10 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link) bp->port.pmf = 0; + /* clear pending work in rtnl task */ + bp->sp_rtnl_state = 0; + smp_mb(); + /* Free SKBs, SGEs, TPA pool and driver internals */ bnx2x_free_skbs(bp); if (CNIC_LOADED(bp))