Lines Matching defs:desc
115 struct vring_desc *desc;
119 desc = kmalloc((out + in) * sizeof(struct vring_desc), gfp);
120 if (!desc)
125 desc[i].flags = VRING_DESC_F_NEXT;
126 desc[i].addr = sg_phys(sg);
127 desc[i].len = sg->length;
128 desc[i].next = i+1;
132 desc[i].flags = VRING_DESC_F_NEXT|VRING_DESC_F_WRITE;
133 desc[i].addr = sg_phys(sg);
134 desc[i].len = sg->length;
135 desc[i].next = i+1;
140 desc[i-1].flags &= ~VRING_DESC_F_NEXT;
141 desc[i-1].next = 0;
148 vq->vring.desc[head].flags = VRING_DESC_F_INDIRECT;
149 vq->vring.desc[head].addr = virt_to_phys(desc);
150 vq->vring.desc[head].len = i * sizeof(struct vring_desc);
153 vq->free_head = vq->vring.desc[head].next;
195 for (i = vq->free_head; out; i = vq->vring.desc[i].next, out--) {
196 vq->vring.desc[i].flags = VRING_DESC_F_NEXT;
197 vq->vring.desc[i].addr = sg_phys(sg);
198 vq->vring.desc[i].len = sg->length;
202 for (; in; i = vq->vring.desc[i].next, in--) {
203 vq->vring.desc[i].flags = VRING_DESC_F_NEXT|VRING_DESC_F_WRITE;
204 vq->vring.desc[i].addr = sg_phys(sg);
205 vq->vring.desc[i].len = sg->length;
210 vq->vring.desc[prev].flags &= ~VRING_DESC_F_NEXT;
265 if (vq->vring.desc[i].flags & VRING_DESC_F_INDIRECT)
266 kfree(phys_to_virt(vq->vring.desc[i].addr));
268 while (vq->vring.desc[i].flags & VRING_DESC_F_NEXT) {
269 i = vq->vring.desc[i].next;
273 vq->vring.desc[i].next = vq->free_head;
444 vq->vring.desc[i].next = i+1;