From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDzji-0004si-Dw for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDzjb-0005Ve-HL for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:41 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:63010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDzjb-0005Ro-6j for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:39 -0400 Received: by mail-wy0-f173.google.com with SMTP id 22so836426wyh.4 for ; Wed, 12 Oct 2011 07:24:38 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 12 Oct 2011 16:24:10 +0200 Message-Id: <1318429451-9306-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1318429451-9306-1-git-send-email-pbonzini@redhat.com> References: <1318429451-9306-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 09/10] scsi: pass cdb to alloc_req List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This will let scsi-block choose between passthrough and emulation. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 2 +- hw/scsi-disk.c | 4 ++-- hw/scsi-generic.c | 2 +- hw/scsi.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 252e903..72c0dd2 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -451,7 +451,7 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun, req = scsi_req_alloc(&reqops_target_command, d, tag, lun, hba_private); } else { - req = d->info->alloc_req(d, tag, lun, hba_private); + req = d->info->alloc_req(d, tag, lun, buf, hba_private); } } diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 6c1d5a2..835cc7f 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1593,8 +1593,8 @@ static const SCSIReqOps scsi_disk_reqops = { .get_buf = scsi_get_buf, }; -static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, - uint32_t lun, void *hba_private) +static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, + uint8_t *buf, void *hba_private) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); SCSIRequest *req; diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index eb066ba..9091e13 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -443,7 +443,7 @@ const SCSIReqOps scsi_generic_req_ops = { }; static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, - void *hba_private) + uint8_t *buf, void *hba_private) { SCSIRequest *req; diff --git a/hw/scsi.h b/hw/scsi.h index c2eeee3..aa816e6 100644 --- a/hw/scsi.h +++ b/hw/scsi.h @@ -93,7 +93,7 @@ struct SCSIDeviceInfo { scsi_qdev_initfn init; void (*destroy)(SCSIDevice *s); SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun, - void *hba_private); + uint8_t *buf, void *hba_private); void (*unit_attention_reported)(SCSIDevice *s); }; -- 1.7.6