Lines Matching refs:req_data
16 struct virtio_pmem_request *req_data, *req_buf; in virtio_pmem_host_ack() local
21 while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { in virtio_pmem_host_ack()
22 req_data->done = true; in virtio_pmem_host_ack()
23 wake_up(&req_data->host_acked); in virtio_pmem_host_ack()
42 struct virtio_pmem_request *req_data; in virtio_pmem_flush() local
48 req_data = kmalloc(sizeof(*req_data), GFP_KERNEL); in virtio_pmem_flush()
49 if (!req_data) in virtio_pmem_flush()
52 req_data->done = false; in virtio_pmem_flush()
53 init_waitqueue_head(&req_data->host_acked); in virtio_pmem_flush()
54 init_waitqueue_head(&req_data->wq_buf); in virtio_pmem_flush()
55 INIT_LIST_HEAD(&req_data->list); in virtio_pmem_flush()
56 req_data->req.type = cpu_to_le32(VIRTIO_PMEM_REQ_TYPE_FLUSH); in virtio_pmem_flush()
57 sg_init_one(&sg, &req_data->req, sizeof(req_data->req)); in virtio_pmem_flush()
59 sg_init_one(&ret, &req_data->resp.ret, sizeof(req_data->resp)); in virtio_pmem_flush()
69 while ((err = virtqueue_add_sgs(vpmem->req_vq, sgs, 1, 1, req_data, in virtio_pmem_flush()
73 req_data->wq_buf_avail = false; in virtio_pmem_flush()
74 list_add_tail(&req_data->list, &vpmem->req_list); in virtio_pmem_flush()
78 wait_event(req_data->wq_buf, req_data->wq_buf_avail); in virtio_pmem_flush()
92 wait_event(req_data->host_acked, req_data->done); in virtio_pmem_flush()
93 err = le32_to_cpu(req_data->resp.ret); in virtio_pmem_flush()
96 kfree(req_data); in virtio_pmem_flush()