aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2013-06-24 04:04:10 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-24 04:47:47 -0400
commit37173488400704f1a05656616cd12baa9e03173b (patch)
tree723139d3df118213e172d9ba4fd8f77b1298b1c6 /drivers/net/ethernet
parentaeb193ea6cef28e33589de05ef932424f8e19bde (diff)
bnx2x: Fix compilation with no IOV support
This fixes an issue caused by submit 78c3bcc5d1af64f51d9f30b0f5a2d1985bf69734 `bnx2x: Improve PF behaviour toward VF', which made the bnx2x driver fail compilation when PCI_IOV is not set. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c14
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c14
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h2
3 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index d468fe48093a..73189888766d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -5457,18 +5457,8 @@ static void bnx2x_timer(unsigned long data)
5457 bnx2x_stats_handle(bp, STATS_EVENT_UPDATE); 5457 bnx2x_stats_handle(bp, STATS_EVENT_UPDATE);
5458 5458
5459 /* sample pf vf bulletin board for new posts from pf */ 5459 /* sample pf vf bulletin board for new posts from pf */
5460 if (IS_VF(bp)) { 5460 if (IS_VF(bp))
5461 bnx2x_sample_bulletin(bp); 5461 bnx2x_timer_sriov(bp);
5462
5463 /* if channel is down we need to self destruct */
5464 if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) {
5465 smp_mb__before_clear_bit();
5466 set_bit(BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN,
5467 &bp->sp_rtnl_state);
5468 smp_mb__after_clear_bit();
5469 schedule_delayed_work(&bp->sp_rtnl_task, 0);
5470 }
5471 }
5472 5462
5473 mod_timer(&bp->timer, jiffies + bp->current_interval); 5463 mod_timer(&bp->timer, jiffies + bp->current_interval);
5474} 5464}
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index bda4d7e7fe7b..95861efb5051 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -3426,6 +3426,20 @@ enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp)
3426 return PFVF_BULLETIN_UPDATED; 3426 return PFVF_BULLETIN_UPDATED;
3427} 3427}
3428 3428
3429void bnx2x_timer_sriov(struct bnx2x *bp)
3430{
3431 bnx2x_sample_bulletin(bp);
3432
3433 /* if channel is down we need to self destruct */
3434 if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) {
3435 smp_mb__before_clear_bit();
3436 set_bit(BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN,
3437 &bp->sp_rtnl_state);
3438 smp_mb__after_clear_bit();
3439 schedule_delayed_work(&bp->sp_rtnl_task, 0);
3440 }
3441}
3442
3429void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) 3443void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp)
3430{ 3444{
3431 /* vf doorbells are embedded within the regview */ 3445 /* vf doorbells are embedded within the regview */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
index 9fc029ed9547..d143a7cdbbbe 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h
@@ -751,6 +751,7 @@ static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp,
751} 751}
752 752
753enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); 753enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp);
754void bnx2x_timer_sriov(struct bnx2x *bp);
754void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp); 755void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp);
755int bnx2x_vf_pci_alloc(struct bnx2x *bp); 756int bnx2x_vf_pci_alloc(struct bnx2x *bp);
756int bnx2x_enable_sriov(struct bnx2x *bp); 757int bnx2x_enable_sriov(struct bnx2x *bp);
@@ -809,6 +810,7 @@ static inline enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp
809{ 810{
810 return PFVF_BULLETIN_UNCHANGED; 811 return PFVF_BULLETIN_UNCHANGED;
811} 812}
813static inline void bnx2x_timer_sriov(struct bnx2x *bp) {}
812 814
813static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) 815static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp)
814{ 816{