Commit 37173488 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: Fix compilation with no IOV support

This fixes an issue caused by submit 78c3bcc5
`bnx2x: Improve PF behaviour toward VF', which made the bnx2x driver fail
compilation when PCI_IOV is not set.
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aeb193ea
...@@ -5457,18 +5457,8 @@ static void bnx2x_timer(unsigned long data) ...@@ -5457,18 +5457,8 @@ static void bnx2x_timer(unsigned long data)
bnx2x_stats_handle(bp, STATS_EVENT_UPDATE); bnx2x_stats_handle(bp, STATS_EVENT_UPDATE);
/* sample pf vf bulletin board for new posts from pf */ /* sample pf vf bulletin board for new posts from pf */
if (IS_VF(bp)) { if (IS_VF(bp))
bnx2x_sample_bulletin(bp); bnx2x_timer_sriov(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);
}
}
mod_timer(&bp->timer, jiffies + bp->current_interval); mod_timer(&bp->timer, jiffies + bp->current_interval);
} }
......
...@@ -3426,6 +3426,20 @@ enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp) ...@@ -3426,6 +3426,20 @@ enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp)
return PFVF_BULLETIN_UPDATED; return PFVF_BULLETIN_UPDATED;
} }
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);
}
}
void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp)
{ {
/* vf doorbells are embedded within the regview */ /* vf doorbells are embedded within the regview */
......
...@@ -751,6 +751,7 @@ static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp, ...@@ -751,6 +751,7 @@ static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp,
} }
enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp);
void bnx2x_timer_sriov(struct bnx2x *bp);
void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp); void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp);
int bnx2x_vf_pci_alloc(struct bnx2x *bp); int bnx2x_vf_pci_alloc(struct bnx2x *bp);
int bnx2x_enable_sriov(struct bnx2x *bp); int bnx2x_enable_sriov(struct bnx2x *bp);
...@@ -809,6 +810,7 @@ static inline enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp ...@@ -809,6 +810,7 @@ static inline enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp
{ {
return PFVF_BULLETIN_UNCHANGED; return PFVF_BULLETIN_UNCHANGED;
} }
static inline void bnx2x_timer_sriov(struct bnx2x *bp) {}
static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment