Lines Matching defs:cpkt
152 struct virtio_console_control cpkt;
555 portdev->cpkt.id = cpu_to_virtio32(portdev->vdev, port_id);
556 portdev->cpkt.event = cpu_to_virtio16(portdev->vdev, event);
557 portdev->cpkt.value = cpu_to_virtio16(portdev->vdev, value);
559 sg_init_one(sg, &portdev->cpkt, sizeof(struct virtio_console_control));
561 if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) {
1563 struct virtio_console_control *cpkt;
1568 cpkt = (struct virtio_console_control *)(buf->buf + buf->offset);
1570 port = find_port_by_id(portdev, virtio32_to_cpu(vdev, cpkt->id));
1572 cpkt->event != cpu_to_virtio16(vdev, VIRTIO_CONSOLE_PORT_ADD)) {
1575 "Invalid index %u in control packet\n", cpkt->id);
1579 switch (virtio16_to_cpu(vdev, cpkt->event)) {
1587 if (virtio32_to_cpu(vdev, cpkt->id) >=
1592 cpkt->id, portdev->max_nr_ports - 1);
1595 add_port(portdev, virtio32_to_cpu(vdev, cpkt->id));
1601 if (!cpkt->value)
1622 memcpy(&size, buf->buf + buf->offset + sizeof(*cpkt),
1631 port->host_connected = virtio16_to_cpu(vdev, cpkt->value);
1659 * Skip the size of the header and the cpkt to get the size
1662 name_size = buf->len - buf->offset - sizeof(*cpkt) + 1;
1670 strscpy(port->name, buf->buf + buf->offset + sizeof(*cpkt),