]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bnx2x: Clean the sp rtnl task upon unload
authorDmitry Kravkov <dmitry@broadcom.com>
Sun, 17 Nov 2013 06:59:26 +0000 (08:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Nov 2013 20:45:44 +0000 (15:45 -0500)
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 <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

index dcafbda3e5be1035034d61c486f4eefceb6887f6..ec96130533cc54630c3f26f6253e58b5a0f5a7cf 100644 (file)
@@ -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))