Received: from eggs.gnu.org ([140.186.70.92]:55590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIeRk-0000kF-4R for qemu-devel@nongnu.org; Tue, 25 Oct 2011 06:41:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIeRY-0006NK-Ta for qemu-devel@nongnu.org; Tue, 25 Oct 2011 06:41:27 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:55326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIeRW-0006KL-H2 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 06:41:15 -0400 Received: by mail-ww0-f53.google.com with SMTP id 36so464153wwi.10 for ; Tue, 25 Oct 2011 03:41:14 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 25 Oct 2011 12:40:31 +0200 Message-Id: <1319539241-26436-24-git-send-email-pbonzini@redhat.com> In-Reply-To: <1319539241-26436-1-git-send-email-pbonzini@redhat.com> References: <1319539241-26436-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 23/33] scsi-generic: remove scsi_req_fixup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com This is not needed anymore, since asynchronous ioctls were introduced by commit 221f715 (new scsi-generic abstraction, use SG_IO, 2009-03-28). Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 5206765..5e2d4c0 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -232,19 +232,6 @@ static uint8_t *scsi_get_buf(SCSIRequest *req) return r->buf; } -static void scsi_req_fixup(SCSIRequest *req) -{ - switch(req->cmd.buf[0]) { - case REWIND: - case START_STOP: - if (req->dev->type == TYPE_TAPE) { - /* force IMMED, otherwise qemu waits end of command */ - req->cmd.buf[1] = 0x01; - } - break; - } -} - /* Execute a scsi command. Returns the length of the data expected by the command. This will be Positive for data transfers from the device (eg. disk reads), negative for transfers to the device (eg. disk writes), @@ -256,8 +243,6 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd) SCSIDevice *s = r->req.dev; int ret; - scsi_req_fixup(&r->req); - DPRINTF("Command: lun=%d tag=0x%x len %zd data=0x%02x", lun, tag, r->req.cmd.xfer, cmd[0]); -- 1.7.6