From patchwork Fri Jul 22 14:51:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 999712 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6MEpc2N028962 for ; Fri, 22 Jul 2011 14:51:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625Ab1GVOve (ORCPT ); Fri, 22 Jul 2011 10:51:34 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44144 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754605Ab1GVOvd (ORCPT ); Fri, 22 Jul 2011 10:51:33 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 12D398B013; Fri, 22 Jul 2011 16:51:33 +0200 (CEST) From: Hannes Reinecke To: qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , kvm@vger.kernel.org, Alexander Graf , Hannes Reinecke Subject: [PATCH 3/6] scsi: Remove REZERO_UNIT emulation Date: Fri, 22 Jul 2011 16:51:14 +0200 Message-Id: <1311346277-32329-4-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1311346277-32329-1-git-send-email-hare@suse.de> References: <1311346277-32329-1-git-send-email-hare@suse.de> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 22 Jul 2011 14:51:38 +0000 (UTC) REZERO_UNIT command is obsolete. Remove support for it. Signed-off-by: Hannes Reinecke --- hw/scsi-bus.c | 3 --- hw/scsi-defs.h | 1 - hw/scsi-disk.c | 7 ------- 3 files changed, 0 insertions(+), 11 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index facc98d..52a6784 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -223,7 +223,6 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd) switch(cmd[0]) { case TEST_UNIT_READY: - case REZERO_UNIT: case START_STOP: case SEEK_6: case WRITE_FILEMARKS: @@ -516,8 +515,6 @@ static const char *scsi_command_name(uint8_t cmd) { static const char *names[] = { [ TEST_UNIT_READY ] = "TEST_UNIT_READY", - [ REZERO_UNIT ] = "REZERO_UNIT", - /* REWIND and REZERO_UNIT use the same operation code */ [ REQUEST_SENSE ] = "REQUEST_SENSE", [ FORMAT_UNIT ] = "FORMAT_UNIT", [ READ_BLOCK_LIMITS ] = "READ_BLOCK_LIMITS", diff --git a/hw/scsi-defs.h b/hw/scsi-defs.h index 8513983..1f40c5c 100644 --- a/hw/scsi-defs.h +++ b/hw/scsi-defs.h @@ -25,7 +25,6 @@ */ #define TEST_UNIT_READY 0x00 -#define REZERO_UNIT 0x01 #define REQUEST_SENSE 0x03 #define FORMAT_UNIT 0x04 #define READ_BLOCK_LIMITS 0x05 diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 910d3b5..323368a 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -972,12 +972,6 @@ static int scsi_disk_emulate_command(SCSIDiskReq *r, uint8_t *outbuf) break; case VERIFY: break; - case REZERO_UNIT: - DPRINTF("Rezero Unit\n"); - if (!bdrv_is_inserted(s->bs)) { - goto not_ready; - } - break; default: scsi_command_complete(r, CHECK_CONDITION, SENSE_CODE(INVALID_OPCODE)); return -1; @@ -1059,7 +1053,6 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *buf) case SERVICE_ACTION_IN: case REPORT_LUNS: case VERIFY: - case REZERO_UNIT: rc = scsi_disk_emulate_command(r, outbuf); if (rc < 0) { return 0;