From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49726 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oy4fa-0008US-4O for qemu-devel@nongnu.org; Tue, 21 Sep 2010 11:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oy4fV-0005ws-Ay for qemu-devel@nongnu.org; Tue, 21 Sep 2010 11:22:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45654) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oy4fV-0005wf-4j for qemu-devel@nongnu.org; Tue, 21 Sep 2010 11:22:05 -0400 From: Kevin Wolf Date: Tue, 21 Sep 2010 17:22:01 +0200 Message-Id: <1285082522-24407-20-git-send-email-kwolf@redhat.com> In-Reply-To: <1285082522-24407-1-git-send-email-kwolf@redhat.com> References: <1285082522-24407-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 19/20] scsi_bus: fix length and xfer_mode for RESERVE and RELEASE commands List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Bernhard Kohl For the RESERVE and RELEASE commands the length must be zero and xfer_mode must be SCSI_XFER_NONE. Signed-off-by: Bernhard Kohl Signed-off-by: Kevin Wolf --- hw/scsi-bus.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 7aa0bcd..5a3fd4b 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -208,6 +208,8 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd) case SEEK_6: case WRITE_FILEMARKS: case SPACE: + case RESERVE: + case RELEASE: case ERASE: case ALLOW_MEDIUM_REMOVAL: case VERIFY: @@ -319,7 +321,6 @@ static void scsi_req_xfer_mode(SCSIRequest *req) case WRITE_BUFFER: case FORMAT_UNIT: case REASSIGN_BLOCKS: - case RESERVE: case SEARCH_EQUAL: case SEARCH_HIGH: case SEARCH_LOW: -- 1.7.2.2