summary refs log tree commit diff stats
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-11-26 15:33:57 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:37 -0600
commit97a064356704af1756270b1d56dea2690ae015de (patch)
treeaed2584678edddfd556232744688c1d22dc2adbf /hw/scsi.h
parentebf460231276efe86ca75613e3cd4169956f7076 (diff)
downloadfocaccia-qemu-97a064356704af1756270b1d56dea2690ae015de.tar.gz
focaccia-qemu-97a064356704af1756270b1d56dea2690ae015de.zip
scsi: add xfer mode
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 8c64067540..c5b30b82b2 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -18,6 +18,12 @@ typedef struct SCSIDeviceInfo SCSIDeviceInfo;
 typedef void (*scsi_completionfn)(SCSIBus *bus, int reason, uint32_t tag,
                                   uint32_t arg);
 
+enum SCSIXferMode {
+    SCSI_XFER_NONE,      /*  TEST_UNIT_READY, ...            */
+    SCSI_XFER_FROM_DEV,  /*  READ, INQUIRY, MODE_SENSE, ...  */
+    SCSI_XFER_TO_DEV,    /*  WRITE, MODE_SELECT, ...         */
+};
+
 typedef struct SCSIRequest {
     SCSIBus           *bus;
     SCSIDevice        *dev;
@@ -28,6 +34,7 @@ typedef struct SCSIRequest {
         int len;
         size_t xfer;
         uint64_t lba;
+        enum SCSIXferMode mode;
     } cmd;
     BlockDriverAIOCB  *aiocb;
     QTAILQ_ENTRY(SCSIRequest) next;