From 12010e7b29a2e777153440ded6fd5bd426eed3e4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 3 Aug 2011 10:49:09 +0200 Subject: scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- hw/scsi.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'hw/scsi.h') 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 { -- cgit 1.4.1