diff options
author | Paolo Bonzini | 2011-08-03 10:49:09 +0200 |
---|---|---|
committer | Anthony Liguori | 2011-08-12 15:27:37 +0200 |
commit | 12010e7b29a2e777153440ded6fd5bd426eed3e4 (patch) | |
tree | fb1cb1307998769551af79748d601dd27635ba5e /hw/scsi.h | |
parent | scsi: introduce SCSIReqOps (diff) | |
download | qemu-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.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 { |