diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2014-02-12 20:19:56 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-13 04:15:42 +0400 |
commit | 230bb0f33672b5fad1c485ca82789f427fc1b253 (patch) | |
tree | 4fbf9c5645eae4ae9b6d769d061b376d6dc2bae6 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | |
parent | 0155a27cda683641d29e04e0fbea44afbd302fff (diff) | |
download | linux-230bb0f33672b5fad1c485ca82789f427fc1b253.tar.xz |
bnx2x: (semantic) revise scheduling of sp_rtnl
This removes the various points where the driver use bit operations in order
to schedule the sp_rtnl_task from the code, adding a single utility function
that does it instead.
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index bf001602bbb6..98b53671a652 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -983,11 +983,8 @@ op_err: op_done: case BNX2X_VFOP_QSETUP_DONE: vf->cfg_flags |= VF_CFG_VLAN; - smp_mb__before_clear_bit(); - set_bit(BNX2X_SP_RTNL_HYPERVISOR_VLAN, - &bp->sp_rtnl_state); - smp_mb__after_clear_bit(); - schedule_delayed_work(&bp->sp_rtnl_task, 0); + bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_HYPERVISOR_VLAN, + BNX2X_MSG_IOV); bnx2x_vfop_end(bp, vf, vfop); return; default: @@ -3812,13 +3809,9 @@ void bnx2x_timer_sriov(struct bnx2x *bp) bnx2x_sample_bulletin(bp); /* if channel is down we need to self destruct */ - if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) { - smp_mb__before_clear_bit(); - set_bit(BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN, - &bp->sp_rtnl_state); - smp_mb__after_clear_bit(); - schedule_delayed_work(&bp->sp_rtnl_task, 0); - } + if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) + bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN, + BNX2X_MSG_IOV); } void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) |