#ifndef _QED_CHAIN_H
#define _QED_CHAIN_H
#include <linux/types.h>
#include <asm/byteorder.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/qed/common_hsi.h>
enum qed_chain_mode { … };
enum qed_chain_use_mode { … };
enum qed_chain_cnt_type { … };
struct qed_chain_next { … };
struct qed_chain_pbl_u16 { … };
struct qed_chain_pbl_u32 { … };
struct qed_chain_u16 { … };
struct qed_chain_u32 { … };
struct addr_tbl_entry { … };
struct qed_chain { … };
struct qed_chain_init_params { … };
#define QED_CHAIN_PAGE_SIZE …
#define ELEMS_PER_PAGE(elem_size, page_size) …
#define UNUSABLE_ELEMS_PER_PAGE(elem_size, mode) …
#define USABLE_ELEMS_PER_PAGE(elem_size, page_size, mode) …
#define QED_CHAIN_PAGE_CNT(elem_cnt, elem_size, page_size, mode) …
#define is_chain_u16(p) …
#define is_chain_u32(p) …
static inline u16 qed_chain_get_prod_idx(const struct qed_chain *chain)
{ … }
static inline u16 qed_chain_get_cons_idx(const struct qed_chain *chain)
{ … }
static inline u32 qed_chain_get_prod_idx_u32(const struct qed_chain *chain)
{ … }
static inline u32 qed_chain_get_cons_idx_u32(const struct qed_chain *chain)
{ … }
static inline u16 qed_chain_get_elem_used(const struct qed_chain *chain)
{ … }
static inline u16 qed_chain_get_elem_left(const struct qed_chain *chain)
{ … }
static inline u32 qed_chain_get_elem_used_u32(const struct qed_chain *chain)
{ … }
static inline u32 qed_chain_get_elem_left_u32(const struct qed_chain *chain)
{ … }
static inline u16 qed_chain_get_usable_per_page(const struct qed_chain *chain)
{ … }
static inline u8 qed_chain_get_unusable_per_page(const struct qed_chain *chain)
{ … }
static inline u32 qed_chain_get_page_cnt(const struct qed_chain *chain)
{ … }
static inline dma_addr_t qed_chain_get_pbl_phys(const struct qed_chain *chain)
{ … }
static inline void
qed_chain_advance_page(struct qed_chain *p_chain,
void **p_next_elem, void *idx_to_inc, void *page_to_inc)
{ … }
#define is_unusable_idx(p, idx) …
#define is_unusable_idx_u32(p, idx) …
#define is_unusable_next_idx(p, idx) …
#define is_unusable_next_idx_u32(p, idx) …
#define test_and_skip(p, idx) …
static inline void qed_chain_return_produced(struct qed_chain *p_chain)
{ … }
static inline void *qed_chain_produce(struct qed_chain *p_chain)
{ … }
static inline u32 qed_chain_get_capacity(struct qed_chain *p_chain)
{ … }
static inline void qed_chain_recycle_consumed(struct qed_chain *p_chain)
{ … }
static inline void *qed_chain_consume(struct qed_chain *p_chain)
{ … }
static inline void qed_chain_reset(struct qed_chain *p_chain)
{ … }
static inline void *qed_chain_get_last_elem(struct qed_chain *p_chain)
{ … }
static inline void qed_chain_set_prod(struct qed_chain *p_chain,
u32 prod_idx, void *p_prod_elem)
{ … }
static inline void qed_chain_pbl_zero_mem(struct qed_chain *p_chain)
{ … }
#endif