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/usb-msd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/usb-msd.c') diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 90e57fbf6b..4072efd4b7 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -370,8 +370,8 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p) s->tag, cbw.flags, cbw.cmd_len, s->data_len); s->residue = 0; s->scsi_len = 0; - s->req = scsi_req_new(s->scsi_dev, s->tag, 0, NULL); - scsi_req_enqueue(s->req, cbw.cmd); + s->req = scsi_req_new(s->scsi_dev, s->tag, 0, cbw.cmd, NULL); + scsi_req_enqueue(s->req); /* ??? Should check that USB and SCSI data transfer directions match. */ if (s->mode != USB_MSDM_CSW && s->residue == 0) { -- cgit 1.4.1