diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2011-08-03 10:49:09 +0200 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-12 08:27:37 -0500 |
| commit | 12010e7b29a2e777153440ded6fd5bd426eed3e4 (patch) | |
| tree | fb1cb1307998769551af79748d601dd27635ba5e /hw/scsi.h | |
| parent | 8dbd4574882cade8261c2b6225df68a65345c75c (diff) | |
| download | focaccia-qemu-12010e7b29a2e777153440ded6fd5bd426eed3e4.tar.gz focaccia-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
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 { |