From patchwork Tue Jul 10 14:15:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 170200 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A9D932C0089 for ; Wed, 11 Jul 2012 00:51:07 +1000 (EST) Received: from localhost ([::1]:33865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobEv-0004ro-6U for incoming@patchwork.ozlabs.org; Tue, 10 Jul 2012 10:16:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobEC-00039q-BT for qemu-devel@nongnu.org; Tue, 10 Jul 2012 10:15:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SobE8-0002GL-RU for qemu-devel@nongnu.org; Tue, 10 Jul 2012 10:15:47 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:38523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SobE8-0002FT-IT for qemu-devel@nongnu.org; Tue, 10 Jul 2012 10:15:44 -0400 Received: by yenl1 with SMTP id l1so18133yen.4 for ; Tue, 10 Jul 2012 07:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=evLutly3ra0TTiuZW8E5W5T06qR5jZyUzIE2/DBJxVM=; b=EEXkf981AtkLo4tAsBR4HZLlcN52jPvgmX9u8sDwlgFHswgO1gGfRUC+v0YKWOV5Kq OdTIDFqAtVl1mYXPHmtiLIOeOdmnarWI3a1wvx8ODw2i+PGZeH4ZC0lSS5e41pXU3x+8 yMOojYrkCDNSmBAy0Jd367PwmE24edoiXLmClAj8HMPP/3H+wE07kulrUtlXDXpnoL4a ChpkDTO14ln/savi+NCfjXq9jS9G1JMX8PEqrzpi5lp4CicHTBQN5aUEvHlAo8BPbD02 RY/kMPJFyufENxopjDD3Nj7uCkng2OJbMZ5J67j4SnqmS8LuTFHU/jB0u8lQYwerRlk3 0xWg== Received: by 10.66.75.71 with SMTP id a7mr73855523paw.48.1341929742684; Tue, 10 Jul 2012 07:15:42 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-189-113.ip51.fastwebnet.it. [93.34.189.113]) by mx.google.com with ESMTPS id ru4sm29941485pbc.66.2012.07.10.07.15.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Jul 2012 07:15:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 10 Jul 2012 16:15:08 +0200 Message-Id: <1341929710-21574-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1341929710-21574-1-git-send-email-pbonzini@redhat.com> References: <1341929710-21574-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.173 Subject: [Qemu-devel] [PATCH 6/8] scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR 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 The changeable values were not all-zeros for this mode page, fix it. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index e64d659..a7f1f14 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1058,6 +1058,9 @@ static int mode_sense_page(SCSIDiskState *s, int page, uint8_t **p_outbuf, case MODE_PAGE_R_W_ERROR: p[1] = 10; + if (page_control == 1) { /* Changeable Values */ + break; + } p[2] = 0x80; /* Automatic Write Reallocation Enabled */ if (s->qdev.type == TYPE_ROM) { p[3] = 0x20; /* Read Retry Count */