summaryrefslogtreecommitdiffstats
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-11-26 15:33:48 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:36 -0600
commit4c41d2ef5f599372a35d446fb75898fe9841bda4 (patch)
tree155e31286e9f462e0ce3423bd2e6a1912cfbf585 /hw/scsi.h
parent1e37607b5e32dc5f4ee422ae45da4de659db0691 (diff)
downloadhqemu-4c41d2ef5f599372a35d446fb75898fe9841bda4.zip
hqemu-4c41d2ef5f599372a35d446fb75898fe9841bda4.tar.gz
scsi: create common SCSIRequest structure.
Rename the SCSIRequest structs in scsi-disk.c and scsi-generic.c to SCSIDiskReq and SCSIGenericReq. Create a SCSIRequest struct and move the common elements over. 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index d2b274c..7906877 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -2,6 +2,7 @@
#define QEMU_HW_SCSI_H
#include "qdev.h"
+#include "block.h"
/* scsi-disk.c */
enum scsi_reason {
@@ -15,6 +16,13 @@ typedef struct SCSIDeviceInfo SCSIDeviceInfo;
typedef void (*scsi_completionfn)(SCSIBus *bus, int reason, uint32_t tag,
uint32_t arg);
+typedef struct SCSIRequest {
+ SCSIBus *bus;
+ SCSIDevice *dev;
+ uint32_t tag;
+ BlockDriverAIOCB *aiocb;
+} SCSIRequest;
+
struct SCSIDevice
{
DeviceState qdev;
OpenPOWER on IntegriCloud