aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
diff options
context:
space:
mode:
authorAriel Elior <ariele@broadcom.com>2013-06-20 17:39:08 +0300
committerDavid S. Miller <davem@davemloft.net>2013-06-23 23:54:15 -0700
commit78c3bcc5d1af64f51d9f30b0f5a2d1985bf69734 (patch)
tree9b842af30174dc435104d0e90d23b02061b99cd7 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
parentVSOCK: Fix VSOCK_HASH and VSOCK_CONN_HASH (diff)
downloadlinux-dev-78c3bcc5d1af64f51d9f30b0f5a2d1985bf69734.tar.xz
linux-dev-78c3bcc5d1af64f51d9f30b0f5a2d1985bf69734.zip
bnx2x: Improve PF behaviour toward VF
If PF is unloaded with loaded VFs, signal towards VFs so they can detect this gracefully. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> ---- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 ++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 23 +++++++++++++++++++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 24 ++++++++++++++++++++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 2 ++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 12 +++++++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.h | 5 ++++- 7 files changed, 63 insertions(+), 8 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
index 861809d3154b..2088063151d6 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
@@ -113,7 +113,7 @@ static int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping)
{
struct cstorm_vf_zone_data __iomem *zone_data =
REG_ADDR(bp, PXP_VF_ADDR_CSDM_GLOBAL_START);
- int tout = 600, interval = 100; /* wait for 60 seconds */
+ int tout = 100, interval = 100; /* wait for 10 seconds */
if (*done) {
BNX2X_ERR("done was non zero before message to pf was sent\n");
@@ -121,6 +121,16 @@ static int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping)
return -EINVAL;
}
+ /* if PF indicated channel is down avoid sending message. Return success
+ * so calling flow can continue
+ */
+ bnx2x_sample_bulletin(bp);
+ if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) {
+ DP(BNX2X_MSG_IOV, "detecting channel down. Aborting message\n");
+ *done = PFVF_STATUS_SUCCESS;
+ return 0;
+ }
+
/* Write message address */
writel(U64_LO(msg_mapping),
&zone_data->non_trigger.vf_pf_channel.msg_addr_lo);