Lines Matching refs:cpkt

153 	struct virtio_console_control cpkt;  member
553 portdev->cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); in __send_control_msg()
554 portdev->cpkt.event = cpu_to_virtio16(portdev->vdev, event); in __send_control_msg()
555 portdev->cpkt.value = cpu_to_virtio16(portdev->vdev, value); in __send_control_msg()
557 sg_init_one(sg, &portdev->cpkt, sizeof(struct virtio_console_control)); in __send_control_msg()
559 if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) { in __send_control_msg()
1527 struct virtio_console_control *cpkt; in handle_control_message() local
1532 cpkt = (struct virtio_console_control *)(buf->buf + buf->offset); in handle_control_message()
1534 port = find_port_by_id(portdev, virtio32_to_cpu(vdev, cpkt->id)); in handle_control_message()
1536 cpkt->event != cpu_to_virtio16(vdev, VIRTIO_CONSOLE_PORT_ADD)) { in handle_control_message()
1539 "Invalid index %u in control packet\n", cpkt->id); in handle_control_message()
1543 switch (virtio16_to_cpu(vdev, cpkt->event)) { in handle_control_message()
1551 if (virtio32_to_cpu(vdev, cpkt->id) >= in handle_control_message()
1556 cpkt->id, portdev->max_nr_ports - 1); in handle_control_message()
1559 add_port(portdev, virtio32_to_cpu(vdev, cpkt->id)); in handle_control_message()
1565 if (!cpkt->value) in handle_control_message()
1586 memcpy(&size, buf->buf + buf->offset + sizeof(*cpkt), in handle_control_message()
1596 port->host_connected = virtio16_to_cpu(vdev, cpkt->value); in handle_control_message()
1627 name_size = buf->len - buf->offset - sizeof(*cpkt) + 1; in handle_control_message()
1635 strscpy(port->name, buf->buf + buf->offset + sizeof(*cpkt), in handle_control_message()