Exemplo n.º 1
0
static u32 vcd_allocate_buffer_cmn
    (struct vcd_clnt_ctxt *cctxt,
     enum vcd_buffer_type buffer,
     u32 buf_size, u8 **vir_buf_addr, u8 **phy_buf_addr)
{
	u32 rc;
	struct vcd_buffer_pool *buf_pool;

	VCD_MSG_LOW("vcd_allocate_buffer_cmn in %d:",
		    cctxt->clnt_state.state);

	rc = vcd_common_allocate_set_buffer(cctxt, buffer, buf_size,
					    &buf_pool);

	if (!VCD_FAILED(rc)) {
		rc = vcd_allocate_buffer_internal(cctxt,
						  buf_pool,
						  buf_size,
						  vir_buf_addr,
						  phy_buf_addr);
	}

	return rc;
}
Exemplo n.º 2
0
static u32 vcd_allocate_buffer_cmn
    (struct vcd_clnt_ctxt_type_t *p_cctxt,
     enum vcd_buffer_type e_buffer,
     u32 n_buf_size, u8 **pp_vir_buf_addr, u8 **pp_phy_buf_addr)
{
	u32 rc;
	struct vcd_buffer_pool_type *p_buf_pool;

	VCD_MSG_LOW("vcd_allocate_buffer_cmn in %d:",
		    p_cctxt->clnt_state.e_state);

	rc = vcd_common_allocate_set_buffer(p_cctxt, e_buffer, n_buf_size,
					    &p_buf_pool);

	if (!VCD_FAILED(rc)) {
		rc = vcd_allocate_buffer_internal(p_cctxt,
						  p_buf_pool,
						  n_buf_size,
						  pp_vir_buf_addr,
						  pp_phy_buf_addr);
	}

	return rc;
}