summaryrefslogtreecommitdiff
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-08-13 15:44:45 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-28 19:25:51 +0200
commitafd4030c16d290e460cc93f8f9e353516b5451a2 (patch)
tree230de2da3d036bb6cdc28d940d826856bfdd1606 /hw/scsi.h
parent3c2f7c12c2e19707cb4e28dd57180f7be3dd4950 (diff)
downloadqemu-afd4030c16d290e460cc93f8f9e353516b5451a2.tar.gz
qemu-afd4030c16d290e460cc93f8f9e353516b5451a2.tar.bz2
qemu-afd4030c16d290e460cc93f8f9e353516b5451a2.zip
scsi: move tcq/ndev to SCSIBusOps (now SCSIBusInfo)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 7004aaaf5d..b76c4ee0a4 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -9,7 +9,7 @@
#define SCSI_CMD_BUF_SIZE 16
typedef struct SCSIBus SCSIBus;
-typedef struct SCSIBusOps SCSIBusOps;
+typedef struct SCSIBusInfo SCSIBusInfo;
typedef struct SCSICommand SCSICommand;
typedef struct SCSIDevice SCSIDevice;
typedef struct SCSIDeviceInfo SCSIDeviceInfo;
@@ -97,7 +97,8 @@ struct SCSIDeviceInfo {
SCSIReqOps reqops;
};
-struct SCSIBusOps {
+struct SCSIBusInfo {
+ int tcq, ndev;
void (*transfer_data)(SCSIRequest *req, uint32_t arg);
void (*complete)(SCSIRequest *req, uint32_t arg);
void (*cancel)(SCSIRequest *req);
@@ -108,14 +109,12 @@ struct SCSIBus {
int busnr;
SCSISense unit_attention;
- int tcq, ndev;
- const SCSIBusOps *ops;
+ const SCSIBusInfo *info;
SCSIDevice *devs[MAX_SCSI_DEVS];
};
-void scsi_bus_new(SCSIBus *bus, DeviceState *host, int tcq, int ndev,
- const SCSIBusOps *ops);
+void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info);
void scsi_qdev_register(SCSIDeviceInfo *info);
static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)