From patchwork Wed Oct 12 14:24:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 119212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7A288B6F81 for ; Thu, 13 Oct 2011 01:25:05 +1100 (EST) Received: from localhost ([::1]:46150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDzjq-0004no-NC for incoming@patchwork.ozlabs.org; Wed, 12 Oct 2011 10:24:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDzjT-0004VZ-K9 for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDzjR-0005Se-W4 for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:31 -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 1RDzjR-0005Ro-R7 for qemu-devel@nongnu.org; Wed, 12 Oct 2011 10:24:29 -0400 Received: by mail-wy0-f173.google.com with SMTP id 22so836426wyh.4 for ; Wed, 12 Oct 2011 07:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=+8K95CsZsg2Oqc1wfnLjg1ZDKrhZy7fGGT7divvBcBo=; b=sywccqk12dDdfzBmPwHJBzKUa8vswZ0lFLHhXwOr+T5YOarh+BUP2jvVq7SWmaJ7Vm d7rVBeUTLwggHQfN54nqfaYa1g8rXLY+NDPMusehp1Dg0xpUjJrgQ4GTSy9T/abwfEIw B+b+81Baukeebd02T6qYq66vtVHMiF75LEU64= Received: by 10.216.134.96 with SMTP id r74mr2610172wei.81.1318429469205; Wed, 12 Oct 2011 07:24:29 -0700 (PDT) Received: from localhost.localdomain (93-34-218-143.ip51.fastwebnet.it. [93.34.218.143]) by mx.google.com with ESMTPS id j18sm303508wbo.6.2011.10.12.07.24.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Oct 2011 07:24:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 12 Oct 2011 16:24:03 +0200 Message-Id: <1318429451-9306-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1318429451-9306-1-git-send-email-pbonzini@redhat.com> References: <1318429451-9306-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.173 Subject: [Qemu-devel] [PATCH 02/10] scsi-generic: remove scsi_req_fixup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 1e5c41b..5130e9a 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -233,19 +233,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), @@ -257,8 +244,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]);