Lines Matching refs:chain

36 	/* The chain's size/prod/cons are kept in 16-bit variables */
39 /* The chain's size/prod/cons are kept in 32-bit variables */
76 /* Fastpath portion of the chain - required for commands such
88 * chain pages, respectively to the physical addresses
120 /* Slowpath of the chain - required for initialization and destruction,
133 /* Address of first page of the chain - the address is required
140 /* Total number of elements [for entire chain] */
186 static inline u16 qed_chain_get_prod_idx(const struct qed_chain *chain)
188 return chain->u.chain16.prod_idx;
191 static inline u16 qed_chain_get_cons_idx(const struct qed_chain *chain)
193 return chain->u.chain16.cons_idx;
196 static inline u32 qed_chain_get_prod_idx_u32(const struct qed_chain *chain)
198 return chain->u.chain32.prod_idx;
201 static inline u32 qed_chain_get_cons_idx_u32(const struct qed_chain *chain)
203 return chain->u.chain32.cons_idx;
206 static inline u16 qed_chain_get_elem_used(const struct qed_chain *chain)
208 u32 prod = qed_chain_get_prod_idx(chain);
209 u32 cons = qed_chain_get_cons_idx(chain);
210 u16 elem_per_page = chain->elem_per_page;
217 if (chain->mode == QED_CHAIN_MODE_NEXT_PTR)
223 static inline u16 qed_chain_get_elem_left(const struct qed_chain *chain)
225 return (u16)(chain->capacity - qed_chain_get_elem_used(chain));
228 static inline u32 qed_chain_get_elem_used_u32(const struct qed_chain *chain)
230 u64 prod = qed_chain_get_prod_idx_u32(chain);
231 u64 cons = qed_chain_get_cons_idx_u32(chain);
232 u16 elem_per_page = chain->elem_per_page;
239 if (chain->mode == QED_CHAIN_MODE_NEXT_PTR)
245 static inline u32 qed_chain_get_elem_left_u32(const struct qed_chain *chain)
247 return chain->capacity - qed_chain_get_elem_used_u32(chain);
250 static inline u16 qed_chain_get_usable_per_page(const struct qed_chain *chain)
252 return chain->usable_per_page;
255 static inline u8 qed_chain_get_unusable_per_page(const struct qed_chain *chain)
257 return chain->elem_unusable;
260 static inline u32 qed_chain_get_page_cnt(const struct qed_chain *chain)
262 return chain->page_cnt;
265 static inline dma_addr_t qed_chain_get_pbl_phys(const struct qed_chain *chain)
267 return chain->pbl_sp.table_phys;
272 * linked chain.
340 * qed_chain_return_produced(): A chain in which the driver "Produces"
359 * qed_chain_produce(): A chain in which the driver "Produces"
362 * responsibility to validate that the chain has room for
401 * qed_chain_get_capacity(): Get the maximum number of BDs in chain
472 * qed_chain_reset(): Resets the chain to its start state.
474 * @p_chain: pointer to a previously allocated chain.
526 * chain.
560 /* p_virt_addr points at this stage to the last page of the chain */
593 * positive and lower than the chain's capacity.
618 * qed_chain_pbl_zero_mem(): set chain memory to 0.