From c39ce112b60ffafbaf700853e32bea74cbb2c148 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 3 Aug 2011 10:49:10 +0200 Subject: scsi: pass cdb already to scsi_req_new Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue. Passing it to scsi_req_new will let scsi_req_new dispatch common requests through different reqops. Moving the memcpy to scsi_req_new is a hack that will go away as soon as scsi_req_new will also take care of the parsing. Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- hw/lsi53c895a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/lsi53c895a.c') diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index d067a0227e..41c2fb0b70 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -781,10 +781,10 @@ static void lsi_do_command(LSIState *s) assert(s->current == NULL); s->current = qemu_mallocz(sizeof(lsi_request)); s->current->tag = s->select_tag; - s->current->req = scsi_req_new(dev, s->current->tag, s->current_lun, + s->current->req = scsi_req_new(dev, s->current->tag, s->current_lun, buf, s->current); - n = scsi_req_enqueue(s->current->req, buf); + n = scsi_req_enqueue(s->current->req); if (n) { if (n > 0) { lsi_set_phase(s, PHASE_DI); -- cgit 1.4.1