mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 21:42:42 -04:00
qed: simplify chain allocation with init params struct
To simplify qed_chain_alloc() prototype and call sites, introduce struct qed_chain_init_params to specify chain params, and pass a pointer to filled struct to the actual qed_chain_alloc() instead of a long list of separate arguments. Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c3a321b06a
commit
b6db3f71c9
@@ -254,35 +254,9 @@ int qed_dmae_host2host(struct qed_hwfn *p_hwfn,
|
||||
dma_addr_t dest_addr,
|
||||
u32 size_in_dwords, struct qed_dmae_params *p_params);
|
||||
|
||||
/**
|
||||
* @brief qed_chain_alloc - Allocate and initialize a chain
|
||||
*
|
||||
* @param p_hwfn
|
||||
* @param intended_use
|
||||
* @param mode
|
||||
* @param num_elems
|
||||
* @param elem_size
|
||||
* @param p_chain
|
||||
* @param ext_pbl - a possible external PBL
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int
|
||||
qed_chain_alloc(struct qed_dev *cdev,
|
||||
enum qed_chain_use_mode intended_use,
|
||||
enum qed_chain_mode mode,
|
||||
enum qed_chain_cnt_type cnt_type,
|
||||
u32 num_elems,
|
||||
size_t elem_size,
|
||||
struct qed_chain *p_chain, struct qed_chain_ext_pbl *ext_pbl);
|
||||
|
||||
/**
|
||||
* @brief qed_chain_free - Free chain DMA memory
|
||||
*
|
||||
* @param p_hwfn
|
||||
* @param p_chain
|
||||
*/
|
||||
void qed_chain_free(struct qed_dev *cdev, struct qed_chain *p_chain);
|
||||
int qed_chain_alloc(struct qed_dev *cdev, struct qed_chain *chain,
|
||||
struct qed_chain_init_params *params);
|
||||
void qed_chain_free(struct qed_dev *cdev, struct qed_chain *chain);
|
||||
|
||||
/**
|
||||
* @@brief qed_fw_l2_queue - Get absolute L2 queue ID
|
||||
|
||||
Reference in New Issue
Block a user