X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_int_api.h;h=d7b6b86cc1a2076f81a5268ff3c2deaaa52e9d84;hb=c176fd869560516a7ea91f64e1fda85020653cc2;hp=5b9c31de72f78c91e987fda2ea9c013f6ec87f92;hpb=15dfc1ecb39f921cac3c5d61e77cd51fa3c1eb23;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_int_api.h b/drivers/net/qede/base/ecore_int_api.h index 5b9c31de72..d7b6b86cc1 100644 --- a/drivers/net/qede/base/ecore_int_api.h +++ b/drivers/net/qede/base/ecore_int_api.h @@ -24,7 +24,12 @@ enum ecore_int_mode { #endif struct ecore_sb_info { - struct status_block_e4 *sb_virt; + void *sb_virt; /* ptr to "struct status_block_e{4,5}" */ + u32 sb_size; /* size of "struct status_block_e{4,5}" */ + __le16 *sb_pi_array; /* ptr to "sb_virt->pi_array" */ + __le32 *sb_prod_index; /* ptr to "sb_virt->prod_index" */ +#define STATUS_BLOCK_PROD_INDEX_MASK 0xFFFFFF + dma_addr_t sb_phys; u32 sb_ack; /* Last given ack */ u16 igu_sb_id; @@ -42,7 +47,7 @@ struct ecore_sb_info { struct ecore_sb_info_dbg { u32 igu_prod; u32 igu_cons; - u16 pi[PIS_PER_SB_E4]; + u16 pi[PIS_PER_SB]; }; struct ecore_sb_cnt_info { @@ -64,8 +69,8 @@ static OSAL_INLINE u16 ecore_sb_update_sb_idx(struct ecore_sb_info *sb_info) /* barrier(); status block is written to by the chip */ /* FIXME: need some sort of barrier. */ - prod = OSAL_LE32_TO_CPU(sb_info->sb_virt->prod_index) & - STATUS_BLOCK_E4_PROD_INDEX_MASK; + prod = OSAL_LE32_TO_CPU(*sb_info->sb_prod_index) & + STATUS_BLOCK_PROD_INDEX_MASK; if (sb_info->sb_ack != prod) { sb_info->sb_ack = prod; rc |= ECORE_SB_IDX; @@ -92,8 +97,9 @@ static OSAL_INLINE u16 ecore_sb_update_sb_idx(struct ecore_sb_info *sb_info) static OSAL_INLINE void ecore_sb_ack(struct ecore_sb_info *sb_info, enum igu_int_cmd int_cmd, u8 upd_flg) { - struct igu_prod_cons_update igu_ack = { 0 }; + struct igu_prod_cons_update igu_ack; + OSAL_MEMSET(&igu_ack, 0, sizeof(struct igu_prod_cons_update)); igu_ack.sb_id_and_flags = ((sb_info->sb_ack << IGU_PROD_CONS_UPDATE_SB_INDEX_SHIFT) | (upd_flg << IGU_PROD_CONS_UPDATE_UPDATE_FLAG_SHIFT) |