Beispiel #1
0
static void vcd_clnt_cb_in_starting
    (struct vcd_clnt_ctxt *cctxt,
     u32 event, u32 status, void *payload, size_t sz,
	 u32 *ddl_handle, void *const client_data)
{
	struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
	struct vcd_transc *transc =
		(struct vcd_transc *)client_data;
	VCD_MSG_LOW("vcd_clnt_cb_in_starting:");
	if (cctxt->ddl_handle != ddl_handle) {
		VCD_MSG_ERROR("vcd_clnt_cb_in_initing: Wrong DDL handle %p",
			ddl_handle);
		return;
	}

	switch (event) {
	case VCD_EVT_RESP_START:
		{
			vcd_handle_start_done(cctxt,
				(struct vcd_transc *)client_data,
				status);
			break;
		}
	case VCD_EVT_RESP_STOP:
		{
			vcd_handle_stop_done_in_starting(cctxt,
				(struct vcd_transc *)client_data,
				status);
			break;
		}
	case VCD_EVT_IND_HWERRFATAL:
		{
			cctxt->status.cmd_submitted--;
			vcd_mark_command_channel(cctxt->dev_ctxt, transc);
			vcd_handle_err_fatal(cctxt, VCD_EVT_RESP_START,
				status);
			break;
		}
	default:
		{
			VCD_MSG_ERROR("Unexpected callback event=%d status=%d "
				"from DDL",	event, status);
			dev_ctxt->command_continue = false;
			break;
		}
	}
}
Beispiel #2
0
static void vcd_clnt_cb_in_starting
    (struct vcd_clnt_ctxt_type_t *p_cctxt,
     u32 event, u32 status, void *p_payload, u32 size,
	 u32 *ddl_handle, void *const p_client_data)
{
	struct vcd_dev_ctxt_type *p_dev_ctxt = p_cctxt->p_dev_ctxt;
	struct vcd_transc_type *p_transc =
		(struct vcd_transc_type *)p_client_data;
	VCD_MSG_LOW("vcd_clnt_cb_in_starting:");
	if (p_cctxt->ddl_handle != ddl_handle) {
		VCD_MSG_ERROR("vcd_clnt_cb_in_initing: Wrong DDL handle %p",
			ddl_handle);
		return;
	}

	switch (event) {
	case VCD_EVT_RESP_START:
		{
			vcd_handle_start_done(p_cctxt,
				(struct vcd_transc_type *)p_client_data,
				status);
			break;
		}
	case VCD_EVT_RESP_STOP:
		{
			vcd_handle_stop_done_in_starting(p_cctxt,
				(struct vcd_transc_type *)p_client_data,
				status);
			break;
		}
	case VCD_EVT_IND_HWERRFATAL:
		{
			p_cctxt->status.n_cmd_submitted--;
			vcd_mark_command_channel(p_cctxt->p_dev_ctxt, p_transc);
			vcd_handle_err_fatal(p_cctxt, VCD_EVT_RESP_START,
				status);
			break;
		}
	default:
		{
			VCD_MSG_ERROR("Unexpected callback event=%d status=%d "
				"from DDL",	event, status);
			p_dev_ctxt->b_continue = FALSE;
			break;
		}
	}
}