Lines Matching refs:hvc_data
35 struct hvc_xen_data *hvc_data = dev->data; in read_from_ring() local
36 XENCONS_RING_IDX cons = hvc_data->intf->in_cons; in read_from_ring()
37 XENCONS_RING_IDX prod = hvc_data->intf->in_prod; in read_from_ring()
41 __ASSERT((prod - cons) <= sizeof(hvc_data->intf->in), in read_from_ring()
45 in_idx = MASK_XENCONS_IDX(cons, hvc_data->intf->in); in read_from_ring()
46 str[recv] = hvc_data->intf->in[in_idx]; in read_from_ring()
52 hvc_data->intf->in_cons = cons; in read_from_ring()
54 notify_evtchn(hvc_data->evtchn); in read_from_ring()
61 struct hvc_xen_data *hvc_data = dev->data; in write_to_ring() local
62 XENCONS_RING_IDX cons = hvc_data->intf->out_cons; in write_to_ring()
63 XENCONS_RING_IDX prod = hvc_data->intf->out_prod; in write_to_ring()
67 __ASSERT((prod - cons) <= sizeof(hvc_data->intf->out), in write_to_ring()
70 while ((sent < len) && ((prod - cons) < sizeof(hvc_data->intf->out))) { in write_to_ring()
71 out_idx = MASK_XENCONS_IDX(prod, hvc_data->intf->out); in write_to_ring()
72 hvc_data->intf->out[out_idx] = str[sent]; in write_to_ring()
78 hvc_data->intf->out_prod = prod; in write_to_ring()
81 notify_evtchn(hvc_data->evtchn); in write_to_ring()