summaryrefslogtreecommitdiffstats
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorPaolo Bonzini2011-08-03 10:49:09 +0200
committerAnthony Liguori2011-08-12 15:27:37 +0200
commit12010e7b29a2e777153440ded6fd5bd426eed3e4 (patch)
treefb1cb1307998769551af79748d601dd27635ba5e /hw/scsi.h
parentscsi: introduce SCSIReqOps (diff)
downloadqemu-12010e7b29a2e777153440ded6fd5bd426eed3e4.tar.gz
qemu-12010e7b29a2e777153440ded6fd5bd426eed3e4.tar.xz
qemu-12010e7b29a2e777153440ded6fd5bd426eed3e4.zip
scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index ee76c64bc5..5c0e076d60 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -73,6 +73,12 @@ int cdrom_read_toc_raw(int nb_sectors, uint8_t *buf, int msf, int session_num);
/* scsi-bus.c */
struct SCSIReqOps {
size_t size;
+ void (*free_req)(SCSIRequest *req);
+ int32_t (*send_command)(SCSIRequest *req, uint8_t *buf);
+ void (*read_data)(SCSIRequest *req);
+ void (*write_data)(SCSIRequest *req);
+ void (*cancel_io)(SCSIRequest *req);
+ uint8_t *(*get_buf)(SCSIRequest *req);
};
typedef int (*scsi_qdev_initfn)(SCSIDevice *dev);
@@ -82,12 +88,7 @@ struct SCSIDeviceInfo {
void (*destroy)(SCSIDevice *s);
SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun,
void *hba_private);
- void (*free_req)(SCSIRequest *req);
- int32_t (*send_command)(SCSIRequest *req, uint8_t *buf);
- void (*read_data)(SCSIRequest *req);
- void (*write_data)(SCSIRequest *req);
- void (*cancel_io)(SCSIRequest *req);
- uint8_t *(*get_buf)(SCSIRequest *req);
+ SCSIReqOps reqops;
};
struct SCSIBusOps {