From 7c748b4a83c2d02bcedfd2670821bac3fb9cbec9 Mon Sep 17 00:00:00 2001 From: rusty Date: Tue, 3 Sep 2013 00:55:13 +0000 Subject: 2.5.6.6.3: unify event structs From: Paolo Bonzini All currently defined event structs have the same fields. Simplify the driver by enforcing this also for future structs. Signed-off-by: Paolo Bonzini See: https://lists.oasis-open.org/archives/virtio-comment/201308/msg00031.html Signed-off-by: Rusty Russell git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@29 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- virtio-v1.0-wd01-part1-specification.txt | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'virtio-v1.0-wd01-part1-specification.txt') diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt index 255c653..e6a6f08 100644 --- a/virtio-v1.0-wd01-part1-specification.txt +++ b/virtio-v1.0-wd01-part1-specification.txt @@ -2389,7 +2389,8 @@ following format: struct virtio_scsi_event { // Write-only part u32 event; - ... + u8 lun[8]; + i32 reason; } If bit 31 is set in the event field, the device failed to report @@ -2398,7 +2399,7 @@ poll the logical units for unit attention conditions, and/or do whatever form of bus scan is appropriate for the guest operating system. -Other data that the device writes to the buffer depends on the +The meaning of the reason field depends on the contents of the event field. The following events are defined: No event @@ -2421,13 +2422,6 @@ contents of the event field. The following events are defined: Transport reset #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 - struct virtio_scsi_event_reset { - // Write-only part - u32 event; - u8 lun[8]; - u32 reason; - } - #define VIRTIO_SCSI_EVT_RESET_HARD 0 #define VIRTIO_SCSI_EVT_RESET_RESCAN 1 #define VIRTIO_SCSI_EVT_RESET_REMOVED 2 @@ -2486,13 +2480,6 @@ contents of the event field. The following events are defined: Asynchronous notification #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 - struct virtio_scsi_event_an { - // Write-only part - u32 event; - u8 lun[8]; - u32 reason; - } - By sending this event, the device signals that an asynchronous event was fired from a physical interface. -- cgit v1.2.3