diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-01-01 05:22:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-02 01:45:07 -0800 |
commit | abc5a021ba645cd162205209bd5664a0d4b866a6 (patch) | |
tree | 8dafb2e16c204c01f7387f454d32c40ae8c2e00f /drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | |
parent | d16132cef8a72ff7563aff95f03bf505779fe3e6 (diff) | |
download | op-kernel-dev-abc5a021ba645cd162205209bd5664a0d4b866a6.zip op-kernel-dev-abc5a021ba645cd162205209bd5664a0d4b866a6.tar.gz |
bnx2x: Support PF <-> VF Bulletin Board
The PF <-> VF Bulletin Board is a simple interface between the
PF and the VF. The main reason for the Bulletin Board is to allow
the PF to be the initiator. The VF publishes at 'acquire' stage
the GPA of a Bulletin Board structure it has allocated. The PF notes
this GPA in the VF database. The VF samples the Bulletin Board
periodically for new messages. The latest version of the BB is always
used.
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/broadcom/bnx2x/bnx2x_sriov.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h index 25396fa..aab2a05 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h @@ -378,6 +378,12 @@ struct bnx2x_vfdb { struct bnx2x_vf_mbx mbxs[BNX2X_MAX_NUM_OF_VFS]; #define BP_VF_MBX(bp, vfid) (&((bp)->vfdb->mbxs[(vfid)])) + struct hw_dma bulletin_dma; +#define BP_VF_BULLETIN_DMA(bp) (&((bp)->vfdb->bulletin_dma)) +#define BP_VF_BULLETIN(bp, vf) \ + (((struct pf_vf_bulletin_content *)(BP_VF_BULLETIN_DMA(bp)->addr)) \ + + (vf)) + struct hw_dma sp_dma; #define bnx2x_vf_sp(bp, vf, field) ((bp)->vfdb->sp_dma.addr + \ (vf)->index * sizeof(struct bnx2x_vf_sp) + \ @@ -702,4 +708,16 @@ void bnx2x_dp_tlv_list(struct bnx2x *bp, void *tlvs_list); bool bnx2x_tlv_supported(u16 tlvtype); +u32 bnx2x_crc_vf_bulletin(struct bnx2x *bp, + struct pf_vf_bulletin_content *bulletin); +int bnx2x_post_vf_bulletin(struct bnx2x *bp, int vf); + +enum sample_bulletin_result { + PFVF_BULLETIN_UNCHANGED, + PFVF_BULLETIN_UPDATED, + PFVF_BULLETIN_CRC_ERR +}; + +enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); + #endif /* bnx2x_sriov.h */ |