From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF4bo-00069y-3F for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF4bn-00009F-2o for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:53:35 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:56278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF4bm-0008Uh-Rx for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:53:34 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so7853400pbb.4 for ; Fri, 21 Sep 2012 07:53:34 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 21 Sep 2012 16:52:49 +0200 Message-Id: <1348239169-25040-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1348239169-25040-1-git-send-email-pbonzini@redhat.com> References: <1348239169-25040-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 7/7] SCSI: Standard INQUIRY data should report HiSup flag as set. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, Ronnie Sahlberg From: Ronnie Sahlberg 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 file modificato, 1 inserzione(+). 1 rimozione(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 4ffca7a..95e9158 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 */ -- 1.7.12