From 69429682c6887bfe7911b26766bedcf3bcabb281 Mon Sep 17 00:00:00 2001 From: "Eugene (jno) Dvurechenski" Date: Mon, 26 Oct 2015 15:47:24 +0100 Subject: pc-bios/s390-ccw: add vdev object to store all device details Add VDev "object" as a container for all device-related items. The default object is static. Leverage dependency on many different device-related globals. Make them syntactically visible. Signed-off-by: Eugene (jno) Dvurechenski Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw/virtio.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'pc-bios/s390-ccw/virtio.h') diff --git a/pc-bios/s390-ccw/virtio.h b/pc-bios/s390-ccw/virtio.h index d17b1350d4..b0034aa07f 100644 --- a/pc-bios/s390-ccw/virtio.h +++ b/pc-bios/s390-ccw/virtio.h @@ -222,4 +222,22 @@ static inline ulong virtio_sector_adjust(ulong sector) return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE); } +struct VDev { + int nr_vqs; + VRing *vrings; + int cmd_vr_idx; + void *ring_area; + long wait_reply_timeout; + bool guessed_disk_nature; + SubChannelId schid; + SenseId senseid; + union { + VirtioBlkConfig blk; + } config; +}; +typedef struct VDev VDev; + +VDev *virtio_get_device(void); +VirtioDevType virtio_get_device_type(void); + #endif /* VIRTIO_H */ -- cgit v1.2.3