From patchwork Sat Sep 15 01:13:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ronnie sahlberg X-Patchwork-Id: 184058 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 2DA332C0085 for ; Sat, 15 Sep 2012 11:13:58 +1000 (EST) Received: from localhost ([::1]:35263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCgxI-0004Rh-57 for incoming@patchwork.ozlabs.org; Fri, 14 Sep 2012 21:13:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCgx2-0003uO-MZ for qemu-devel@nongnu.org; Fri, 14 Sep 2012 21:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCgx1-0002iG-Os for qemu-devel@nongnu.org; Fri, 14 Sep 2012 21:13:40 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:64204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCgx1-0002hb-JB for qemu-devel@nongnu.org; Fri, 14 Sep 2012 21:13:39 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so6705737pbb.4 for ; Fri, 14 Sep 2012 18:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KYTmfy/+rXUYYOrBA86QxfwITscUsAH9nPFDfOYibpU=; b=Y5u3XYgxARKejM43FMzeFfAohu/Cna7Xu/awjntgHLB4poarWYrGFA4e4uA5pO2bGF eP+/DSXw3EG3AuIZWTZQs0usHTR/K/AhjEOJH4GYDRUxtNyzWYomTVbNBkXrCfhWOEAf EgdhB11kZw6GH8sDZf2HHUDy/huFVfk52MWSwh+KogA16k/DNtr3f0vSwDZLhvmbZfNb p1W6D0ty0A2uHIqDzotQ0zkthEqYJOGWtrQQm1c/XgKBakHm63F7x5zz+HzervwcQseF zTAjXC+S+qKQO/F0vxWuwCr8SlGtYNW3W0k25kDe9f2O57lwS4muNDhSck+S5fdgXfp1 bjDA== Received: by 10.68.193.162 with SMTP id hp2mr7658340pbc.34.1347671619263; Fri, 14 Sep 2012 18:13:39 -0700 (PDT) Received: from ronniesahlberg@gmail.com (c-71-202-165-15.hsd1.ca.comcast.net. [71.202.165.15]) by mx.google.com with ESMTPS id pj10sm1913768pbb.46.2012.09.14.18.13.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 18:13:38 -0700 (PDT) Received: by ronniesahlberg@gmail.com (sSMTP sendmail emulation); Fri, 14 Sep 2012 18:13:36 -0700 From: Ronnie Sahlberg To: pbonzini@redhat.com, qemu-devel@nongnu.org Date: Fri, 14 Sep 2012 18:13:29 -0700 Message-Id: <1347671609-26498-2-git-send-email-ronniesahlberg@gmail.com> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1347671609-26498-1-git-send-email-ronniesahlberg@gmail.com> References: <1347671609-26498-1-git-send-email-ronniesahlberg@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Ronnie Sahlberg Subject: [Qemu-devel] [PATCH] SCSI: Standard INQUIRY data should report HiSup flag as set. 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 QEMU as far as I know only reports LUN numbers using the modes that are described in SAM4. As such, since all LUN numbers generated by the SCSI emulation in QEMU follow SAM4, we should set the HiSup bit in the standard INQUIRY data to indicate such. From SAM4: 4.6.3 LUNs overview All LUN formats described in this standard are hierarchical in structure even when only a single level in that hierarchy is used. The HISUP bit shall be set to one in the standard INQUIRY data (see SPC-4) when any LUN format described in this standard is used. Non-hierarchical formats are outside the scope of this standard. Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 1585683..52bc062 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -678,7 +678,7 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) * is actually implemented, but we're good enough. */ outbuf[2] = 5; - outbuf[3] = 2; /* Format 2 */ + outbuf[3] = 2 | 0x10; /* Format 2, HiSup */ if (buflen > 36) { outbuf[4] = buflen - 5; /* Additional Length = (Len - 1) - 4 */