diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-08-27 18:13:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-27 22:03:04 -0400 |
commit | c730b170456d9139c3c1f8a9c1f91837be657d60 (patch) | |
tree | f366ea9b1f5778fd7ef40470ad9690e2a0d0131a | |
parent | decf4f3f2df60f87bd807e42d353ac5b7b55639d (diff) |
bnx2x: vf mark stats started
Solve issue where no stats were being collected for VF devices due to missing
configuration in the stats' atomic synchronization mechanism.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c index d63d1327b051..fed9b1543b9f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | |||
@@ -522,20 +522,16 @@ static void bnx2x_func_stats_init(struct bnx2x *bp) | |||
522 | /* should be called under stats_sema */ | 522 | /* should be called under stats_sema */ |
523 | static void __bnx2x_stats_start(struct bnx2x *bp) | 523 | static void __bnx2x_stats_start(struct bnx2x *bp) |
524 | { | 524 | { |
525 | /* vfs travel through here as part of the statistics FSM, but no action | 525 | if (IS_PF(bp)) { |
526 | * is required | 526 | if (bp->port.pmf) |
527 | */ | 527 | bnx2x_port_stats_init(bp); |
528 | if (IS_VF(bp)) | ||
529 | return; | ||
530 | |||
531 | if (bp->port.pmf) | ||
532 | bnx2x_port_stats_init(bp); | ||
533 | 528 | ||
534 | else if (bp->func_stx) | 529 | else if (bp->func_stx) |
535 | bnx2x_func_stats_init(bp); | 530 | bnx2x_func_stats_init(bp); |
536 | 531 | ||
537 | bnx2x_hw_stats_post(bp); | 532 | bnx2x_hw_stats_post(bp); |
538 | bnx2x_storm_stats_post(bp); | 533 | bnx2x_storm_stats_post(bp); |
534 | } | ||
539 | 535 | ||
540 | bp->stats_started = true; | 536 | bp->stats_started = true; |
541 | } | 537 | } |