Lines Matching refs:sg
108 /* sg is used if spages > 0. sg must be the last in is struct */
109 struct scatterlist sg[] __counted_by(sgpages);
353 struct page *page = sg_page(&buf->sg[i]);
411 * Allocate buffer and the sg list. The sg list array is allocated
414 buf = kmalloc(struct_size(buf, sg, pages), GFP_KERNEL);
484 struct scatterlist sg[1];
487 sg_init_one(sg, buf->buf, buf->size);
489 ret = virtqueue_add_inbuf(vq, sg, 1, buf, GFP_ATOMIC);
541 struct scatterlist sg[1];
556 sg_init_one(sg, &portdev->cpkt, sizeof(struct virtio_console_control));
558 if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) {
595 static ssize_t __send_to_port(struct port *port, struct scatterlist *sg,
610 err = virtqueue_add_outbuf(out_vq, sg, nents, data, GFP_ATOMIC);
802 struct scatterlist sg[1];
836 sg_init_one(sg, buf->buf, count);
837 ret = __send_to_port(port, sg, 1, count, buf, nonblock);
852 struct scatterlist *sg;
871 sg_set_page(&(sgl->sg[sgl->n]), buf->page, len, buf->offset);
890 sg_set_page(&(sgl->sg[sgl->n]), page, len, offset);
944 sgl.sg = buf->sg;
945 sg_init_table(sgl.sg, sgl.size);
949 ret = __send_to_port(port, buf->sg, sgl.n, sgl.len, buf, true);
1110 struct scatterlist sg[1];
1122 sg_init_one(sg, data, count);
1123 ret = __send_to_port(port, sg, 1, count, data, false);