From nobody Sun Apr 28 12:07:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150183590138327.103144494044273; Fri, 4 Aug 2017 01:38:21 -0700 (PDT) Received: from localhost ([::1]:45707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY7f-0006Du-18 for importer@patchew.org; Fri, 04 Aug 2017 04:38:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY68-0005HO-6C for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddY63-00067O-LT for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:50541 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddY63-00065Q-Dp for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B25F3ABDC; Fri, 4 Aug 2017 08:36:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Hannes Reinecke To: Paolo Bonzini Date: Fri, 4 Aug 2017 10:36:32 +0200 Message-Id: <1501835795-92331-2-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1501835795-92331-1-git-send-email-hare@suse.de> References: <1501835795-92331-1-git-send-email-hare@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCHv2 1/4] scsi: Make LUN 0 a simple enclosure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hannes Reinecke , qemu-devel@nongnu.org, Hannes Reinecke Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Instead of having an 'invisible' LUN0 (in case LUN 0 is not connected) this patch maks LUN0 a enclosure service, exposing it to the OS. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++= +++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 23c51de..c89e82d 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -493,10 +493,11 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq= *r) if (r->req.lun !=3D 0) { r->buf[0] =3D TYPE_NO_LUN; } else { - r->buf[0] =3D TYPE_NOT_PRESENT | TYPE_INACTIVE; + r->buf[0] =3D TYPE_ENCLOSURE; r->buf[2] =3D 5; /* Version */ r->buf[3] =3D 2 | 0x10; /* HiSup, response data format */ r->buf[4] =3D r->len - 5; /* Additional Length =3D (Len - 1) - 4 */ + r->buf[6] =3D 0x40; /* Enclosure service */ r->buf[7] =3D 0x10 | (r->req.bus->info->tcq ? 0x02 : 0); /* Sync, = TCQ. */ memcpy(&r->buf[8], "QEMU ", 8); memcpy(&r->buf[16], "QEMU TARGET ", 16); @@ -505,6 +506,54 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq = *r) return true; } =20 +static bool scsi_target_emulate_receive_diagnostic(SCSITargetReq *r) +{ + uint8_t page_code =3D r->req.cmd.buf[2]; + unsigned char *enc_desc, *type_desc; + + assert(r->req.dev->lun !=3D r->req.lun); + + scsi_target_alloc_buf(&r->req, 0x38); + + switch (page_code) { + case 0x00: + r->buf[r->len++] =3D page_code ; /* this page */ + r->buf[r->len++] =3D 0x00; + r->buf[r->len++] =3D 0x00; + r->buf[r->len++] =3D 0x03; + r->buf[r->len++] =3D 0x00; + r->buf[r->len++] =3D 0x01; + r->buf[r->len++] =3D 0x08; + break; + case 0x01: + memset(r->buf, 0, 0x38); + r->buf[0] =3D page_code; + r->buf[3] =3D 0x30; + enc_desc =3D &r->buf[8]; + enc_desc[0] =3D 0x09; + enc_desc[2] =3D 1; + enc_desc[3] =3D 0x24; + memcpy(&enc_desc[12], "QEMU ", 8); + memcpy(&enc_desc[20], "QEMU TARGET ", 16); + pstrcpy((char *)&enc_desc[36], 4, qemu_hw_version()); + type_desc =3D &r->buf[48]; + type_desc[1] =3D 1; + r->len =3D 0x38; + break; + case 0x08: + r->buf[0] =3D page_code; + r->buf[1] =3D 0x00; + r->buf[2] =3D 0x00; + r->buf[3] =3D 0x00; + r->len =3D 4; + break; + default: + return false; + } + r->len =3D MIN(r->req.cmd.xfer, r->len); + return true; +} + static size_t scsi_sense_len(SCSIRequest *req) { if (req->dev->type =3D=3D TYPE_SCANNER) @@ -528,6 +577,11 @@ static int32_t scsi_target_send_command(SCSIRequest *r= eq, uint8_t *buf) goto illegal_request; } break; + case RECEIVE_DIAGNOSTIC: + if (!scsi_target_emulate_receive_diagnostic(r)) { + goto illegal_request; + } + break; case REQUEST_SENSE: scsi_target_alloc_buf(&r->req, scsi_sense_len(req)); r->len =3D scsi_device_get_sense(r->req.dev, r->buf, --=20 1.8.5.6 From nobody Sun Apr 28 12:07:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501835901881872.0421205034529; Fri, 4 Aug 2017 01:38:21 -0700 (PDT) Received: from localhost ([::1]:45708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY7f-0006Eg-IW for importer@patchew.org; Fri, 04 Aug 2017 04:38:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY68-0005HK-5e for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddY63-00067C-KR for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:50540 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddY63-00065N-DG for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:39 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B36CFAC17; Fri, 4 Aug 2017 08:36:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Hannes Reinecke To: Paolo Bonzini Date: Fri, 4 Aug 2017 10:36:33 +0200 Message-Id: <1501835795-92331-3-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1501835795-92331-1-git-send-email-hare@suse.de> References: <1501835795-92331-1-git-send-email-hare@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCHv2 2/4] scsi: use qemu_uuid to generate logical identifier for SES X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hannes Reinecke , qemu-devel@nongnu.org, Hannes Reinecke Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The SES enclosure descriptor requires a logical identifier, so generate one using the qemu_uuid and the Qumranet OUI. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index c89e82d..8419c75 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -10,6 +10,7 @@ #include "trace.h" #include "sysemu/dma.h" #include "qemu/cutils.h" +#include "qemu/crc32c.h" =20 static char *scsibus_get_dev_path(DeviceState *dev); static char *scsibus_get_fw_dev_path(DeviceState *dev); @@ -533,6 +534,22 @@ static bool scsi_target_emulate_receive_diagnostic(SCS= ITargetReq *r) enc_desc[0] =3D 0x09; enc_desc[2] =3D 1; enc_desc[3] =3D 0x24; + if (qemu_uuid_set) { + uint32_t crc; + + /* + * Make this a NAA IEEE Registered identifier + * using Qumranet OUI (0x001A4A) and the + * crc32 from the system UUID. + */ + enc_desc[4] =3D 0x50; + enc_desc[5] =3D 0x01; + enc_desc[6] =3D 0xa4; + enc_desc[7] =3D 0xa0; + crc =3D crc32c(0xffffffff, qemu_uuid.data, 16); + cpu_to_le32s(&crc); + memcpy(&enc_desc[8], &crc, 4); + } memcpy(&enc_desc[12], "QEMU ", 8); memcpy(&enc_desc[20], "QEMU TARGET ", 16); pstrcpy((char *)&enc_desc[36], 4, qemu_hw_version()); --=20 1.8.5.6 From nobody Sun Apr 28 12:07:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501836025974428.83802914477144; Fri, 4 Aug 2017 01:40:25 -0700 (PDT) Received: from localhost ([::1]:45823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY9g-0008IY-Gu for importer@patchew.org; Fri, 04 Aug 2017 04:40:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY68-0005HJ-5a for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddY63-00067I-KW for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:50539 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddY63-00065L-DV for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B26DAABDD; Fri, 4 Aug 2017 08:36:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Hannes Reinecke To: Paolo Bonzini Date: Fri, 4 Aug 2017 10:36:34 +0200 Message-Id: <1501835795-92331-4-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1501835795-92331-1-git-send-email-hare@suse.de> References: <1501835795-92331-1-git-send-email-hare@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCHv2 3/4] scsi: clarify sense codes for LUN0 emulation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hannes Reinecke , qemu-devel@nongnu.org, Hannes Reinecke Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The LUN0 emulation is just that, an emulation for a non-existing LUN0. So we should be returning LUN_NOT_SUPPORTED for any request coming from any other LUN. And we should be aborting unhandled commands with INVALID OPCODE, not LUN NOT SUPPORTED. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 8419c75..79a222f 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -583,6 +583,11 @@ static int32_t scsi_target_send_command(SCSIRequest *r= eq, uint8_t *buf) { SCSITargetReq *r =3D DO_UPCAST(SCSITargetReq, req, req); =20 + if (req->lun !=3D 0) { + scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED)); + scsi_req_complete(req, CHECK_CONDITION); + return 0; + } switch (buf[0]) { case REPORT_LUNS: if (!scsi_target_emulate_report_luns(r)) { @@ -613,7 +618,7 @@ static int32_t scsi_target_send_command(SCSIRequest *re= q, uint8_t *buf) case TEST_UNIT_READY: break; default: - scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED)); + scsi_req_build_sense(req, SENSE_CODE(INVALID_OPCODE)); scsi_req_complete(req, CHECK_CONDITION); return 0; illegal_request: --=20 1.8.5.6 From nobody Sun Apr 28 12:07:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501836026383295.2702810231118; Fri, 4 Aug 2017 01:40:26 -0700 (PDT) Received: from localhost ([::1]:45824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY9g-0008J1-SO for importer@patchew.org; Fri, 04 Aug 2017 04:40:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddY68-0005HM-5u for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddY63-00067P-LN for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:50542 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ddY63-00065P-DB for qemu-devel@nongnu.org; Fri, 04 Aug 2017 04:36:39 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C793FAC1A; Fri, 4 Aug 2017 08:36:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Hannes Reinecke To: Paolo Bonzini Date: Fri, 4 Aug 2017 10:36:35 +0200 Message-Id: <1501835795-92331-5-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1501835795-92331-1-git-send-email-hare@suse.de> References: <1501835795-92331-1-git-send-email-hare@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCHv2 4/4] scsi: Add 'enclosure' option for scsi devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hannes Reinecke , qemu-devel@nongnu.org, Hannes Reinecke Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Make enclosure support optional with the 'enclosure' argument to the scsi device. Adding 'enclosure=3Don' as option to the SCSI device will present an enclosure service device on LUN0, either as a stand-alone LUN (in case LUN0 is not assigned) or by setting the EncServ bit int the inquiry data if LUN0 is assigned to a block devices. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 11 ++++++++--- hw/scsi/scsi-disk.c | 4 +++- include/hw/scsi/scsi.h | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 79a222f..c11422b 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -22,6 +22,7 @@ static Property scsi_props[] =3D { DEFINE_PROP_UINT32("channel", SCSIDevice, channel, 0), DEFINE_PROP_UINT32("scsi-id", SCSIDevice, id, -1), DEFINE_PROP_UINT32("lun", SCSIDevice, lun, -1), + DEFINE_PROP_BOOL("enclosure", SCSIDevice, enclosure, false), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -494,11 +495,14 @@ static bool scsi_target_emulate_inquiry(SCSITargetReq= *r) if (r->req.lun !=3D 0) { r->buf[0] =3D TYPE_NO_LUN; } else { - r->buf[0] =3D TYPE_ENCLOSURE; + r->buf[0] =3D r->req.dev->enclosure ? + TYPE_ENCLOSURE : TYPE_NOT_PRESENT | TYPE_INACTIVE; r->buf[2] =3D 5; /* Version */ r->buf[3] =3D 2 | 0x10; /* HiSup, response data format */ r->buf[4] =3D r->len - 5; /* Additional Length =3D (Len - 1) - 4 */ - r->buf[6] =3D 0x40; /* Enclosure service */ + if (r->req.dev->enclosure) { + r->buf[6] =3D 0x40; /* Enclosure service */ + } r->buf[7] =3D 0x10 | (r->req.bus->info->tcq ? 0x02 : 0); /* Sync, = TCQ. */ memcpy(&r->buf[8], "QEMU ", 8); memcpy(&r->buf[16], "QEMU TARGET ", 16); @@ -600,7 +604,8 @@ static int32_t scsi_target_send_command(SCSIRequest *re= q, uint8_t *buf) } break; case RECEIVE_DIAGNOSTIC: - if (!scsi_target_emulate_receive_diagnostic(r)) { + if (!r->req.dev->enclosure || + !scsi_target_emulate_receive_diagnostic(r)) { goto illegal_request; } break; diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 5f1e5e8..153d97d 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -792,7 +792,9 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, = uint8_t *outbuf) the additional length is not adjusted */ outbuf[4] =3D 36 - 5; } - + if (s->qdev.lun =3D=3D 0 && s->qdev.enclosure) { + outbuf[6] =3D 0x40; /* Enclosure service */ + } /* Sync data transfer and TCQ. */ outbuf[7] =3D 0x10 | (req->bus->info->tcq ? 0x02 : 0); return buflen; diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 6b85786..243c185 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -100,6 +100,7 @@ struct SCSIDevice BlockConf conf; SCSISense unit_attention; bool sense_is_ua; + bool enclosure; uint8_t sense[SCSI_SENSE_BUF_SIZE]; uint32_t sense_len; QTAILQ_HEAD(, SCSIRequest) requests; --=20 1.8.5.6