162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci/****************************************************************************** 362306a36Sopenharmony_ci * vscsiif.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Based on the blkif.h code. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright(c) FUJITSU Limited 2008. 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#ifndef __XEN__PUBLIC_IO_SCSI_H__ 1162306a36Sopenharmony_ci#define __XEN__PUBLIC_IO_SCSI_H__ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include "ring.h" 1462306a36Sopenharmony_ci#include "../grant_table.h" 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci/* 1762306a36Sopenharmony_ci * Feature and Parameter Negotiation 1862306a36Sopenharmony_ci * ================================= 1962306a36Sopenharmony_ci * The two halves of a Xen pvSCSI driver utilize nodes within the XenStore to 2062306a36Sopenharmony_ci * communicate capabilities and to negotiate operating parameters. This 2162306a36Sopenharmony_ci * section enumerates these nodes which reside in the respective front and 2262306a36Sopenharmony_ci * backend portions of the XenStore, following the XenBus convention. 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * Any specified default value is in effect if the corresponding XenBus node 2562306a36Sopenharmony_ci * is not present in the XenStore. 2662306a36Sopenharmony_ci * 2762306a36Sopenharmony_ci * XenStore nodes in sections marked "PRIVATE" are solely for use by the 2862306a36Sopenharmony_ci * driver side whose XenBus tree contains them. 2962306a36Sopenharmony_ci * 3062306a36Sopenharmony_ci ***************************************************************************** 3162306a36Sopenharmony_ci * Backend XenBus Nodes 3262306a36Sopenharmony_ci ***************************************************************************** 3362306a36Sopenharmony_ci * 3462306a36Sopenharmony_ci *------------------ Backend Device Identification (PRIVATE) ------------------ 3562306a36Sopenharmony_ci * 3662306a36Sopenharmony_ci * p-devname 3762306a36Sopenharmony_ci * Values: string 3862306a36Sopenharmony_ci * 3962306a36Sopenharmony_ci * A free string used to identify the physical device (e.g. a disk name). 4062306a36Sopenharmony_ci * 4162306a36Sopenharmony_ci * p-dev 4262306a36Sopenharmony_ci * Values: string 4362306a36Sopenharmony_ci * 4462306a36Sopenharmony_ci * A string specifying the backend device: either a 4-tuple "h:c:t:l" 4562306a36Sopenharmony_ci * (host, controller, target, lun, all integers), or a WWN (e.g. 4662306a36Sopenharmony_ci * "naa.60014054ac780582:0"). 4762306a36Sopenharmony_ci * 4862306a36Sopenharmony_ci * v-dev 4962306a36Sopenharmony_ci * Values: string 5062306a36Sopenharmony_ci * 5162306a36Sopenharmony_ci * A string specifying the frontend device in form of a 4-tuple "h:c:t:l" 5262306a36Sopenharmony_ci * (host, controller, target, lun, all integers). 5362306a36Sopenharmony_ci * 5462306a36Sopenharmony_ci *--------------------------------- Features --------------------------------- 5562306a36Sopenharmony_ci * 5662306a36Sopenharmony_ci * feature-sg-grant 5762306a36Sopenharmony_ci * Values: unsigned [VSCSIIF_SG_TABLESIZE...65535] 5862306a36Sopenharmony_ci * Default Value: 0 5962306a36Sopenharmony_ci * 6062306a36Sopenharmony_ci * Specifies the maximum number of scatter/gather elements in grant pages 6162306a36Sopenharmony_ci * supported. If not set, the backend supports up to VSCSIIF_SG_TABLESIZE 6262306a36Sopenharmony_ci * SG elements specified directly in the request. 6362306a36Sopenharmony_ci * 6462306a36Sopenharmony_ci ***************************************************************************** 6562306a36Sopenharmony_ci * Frontend XenBus Nodes 6662306a36Sopenharmony_ci ***************************************************************************** 6762306a36Sopenharmony_ci * 6862306a36Sopenharmony_ci *----------------------- Request Transport Parameters ----------------------- 6962306a36Sopenharmony_ci * 7062306a36Sopenharmony_ci * event-channel 7162306a36Sopenharmony_ci * Values: unsigned 7262306a36Sopenharmony_ci * 7362306a36Sopenharmony_ci * The identifier of the Xen event channel used to signal activity 7462306a36Sopenharmony_ci * in the ring buffer. 7562306a36Sopenharmony_ci * 7662306a36Sopenharmony_ci * ring-ref 7762306a36Sopenharmony_ci * Values: unsigned 7862306a36Sopenharmony_ci * 7962306a36Sopenharmony_ci * The Xen grant reference granting permission for the backend to map 8062306a36Sopenharmony_ci * the sole page in a single page sized ring buffer. 8162306a36Sopenharmony_ci * 8262306a36Sopenharmony_ci * protocol 8362306a36Sopenharmony_ci * Values: string (XEN_IO_PROTO_ABI_*) 8462306a36Sopenharmony_ci * Default Value: XEN_IO_PROTO_ABI_NATIVE 8562306a36Sopenharmony_ci * 8662306a36Sopenharmony_ci * The machine ABI rules governing the format of all ring request and 8762306a36Sopenharmony_ci * response structures. 8862306a36Sopenharmony_ci */ 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci/* 9162306a36Sopenharmony_ci * Xenstore format in practice 9262306a36Sopenharmony_ci * =========================== 9362306a36Sopenharmony_ci * 9462306a36Sopenharmony_ci * The backend driver uses a single_host:many_devices notation to manage domU 9562306a36Sopenharmony_ci * devices. Everything is stored in /local/domain/<backend_domid>/backend/vscsi/. 9662306a36Sopenharmony_ci * The xenstore layout looks like this (dom0 is assumed to be the backend_domid): 9762306a36Sopenharmony_ci * 9862306a36Sopenharmony_ci * <domid>/<vhost>/feature-host = "0" 9962306a36Sopenharmony_ci * <domid>/<vhost>/frontend = "/local/domain/<domid>/device/vscsi/0" 10062306a36Sopenharmony_ci * <domid>/<vhost>/frontend-id = "<domid>" 10162306a36Sopenharmony_ci * <domid>/<vhost>/online = "1" 10262306a36Sopenharmony_ci * <domid>/<vhost>/state = "4" 10362306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/p-dev = "8:0:2:1" or "naa.wwn:lun" 10462306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/state = "4" 10562306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/v-dev = "0:0:0:0" 10662306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/p-dev = "8:0:2:2" 10762306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/state = "4" 10862306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/v-dev = "0:0:1:0" 10962306a36Sopenharmony_ci * 11062306a36Sopenharmony_ci * The frontend driver maintains its state in 11162306a36Sopenharmony_ci * /local/domain/<domid>/device/vscsi/. 11262306a36Sopenharmony_ci * 11362306a36Sopenharmony_ci * <vhost>/backend = "/local/domain/0/backend/vscsi/<domid>/<vhost>" 11462306a36Sopenharmony_ci * <vhost>/backend-id = "0" 11562306a36Sopenharmony_ci * <vhost>/event-channel = "20" 11662306a36Sopenharmony_ci * <vhost>/ring-ref = "43" 11762306a36Sopenharmony_ci * <vhost>/state = "4" 11862306a36Sopenharmony_ci * <vhost>/vscsi-devs/dev-0/state = "4" 11962306a36Sopenharmony_ci * <vhost>/vscsi-devs/dev-1/state = "4" 12062306a36Sopenharmony_ci * 12162306a36Sopenharmony_ci * In addition to the entries for backend and frontend these flags are stored 12262306a36Sopenharmony_ci * for the toolstack: 12362306a36Sopenharmony_ci * 12462306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/p-devname = "/dev/$device" 12562306a36Sopenharmony_ci * <domid>/<vhost>/libxl_ctrl_index = "0" 12662306a36Sopenharmony_ci * 12762306a36Sopenharmony_ci * 12862306a36Sopenharmony_ci * Backend/frontend protocol 12962306a36Sopenharmony_ci * ========================= 13062306a36Sopenharmony_ci * 13162306a36Sopenharmony_ci * To create a vhost along with a device: 13262306a36Sopenharmony_ci * <domid>/<vhost>/feature-host = "0" 13362306a36Sopenharmony_ci * <domid>/<vhost>/frontend = "/local/domain/<domid>/device/vscsi/0" 13462306a36Sopenharmony_ci * <domid>/<vhost>/frontend-id = "<domid>" 13562306a36Sopenharmony_ci * <domid>/<vhost>/online = "1" 13662306a36Sopenharmony_ci * <domid>/<vhost>/state = "1" 13762306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/p-dev = "8:0:2:1" 13862306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/state = "1" 13962306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-0/v-dev = "0:0:0:0" 14062306a36Sopenharmony_ci * Wait for <domid>/<vhost>/state + <domid>/<vhost>/vscsi-devs/dev-0/state become 4 14162306a36Sopenharmony_ci * 14262306a36Sopenharmony_ci * To add another device to a vhost: 14362306a36Sopenharmony_ci * <domid>/<vhost>/state = "7" 14462306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/p-dev = "8:0:2:2" 14562306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/state = "1" 14662306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/v-dev = "0:0:1:0" 14762306a36Sopenharmony_ci * Wait for <domid>/<vhost>/state + <domid>/<vhost>/vscsi-devs/dev-1/state become 4 14862306a36Sopenharmony_ci * 14962306a36Sopenharmony_ci * To remove a device from a vhost: 15062306a36Sopenharmony_ci * <domid>/<vhost>/state = "7" 15162306a36Sopenharmony_ci * <domid>/<vhost>/vscsi-devs/dev-1/state = "5" 15262306a36Sopenharmony_ci * Wait for <domid>/<vhost>/state to become 4 15362306a36Sopenharmony_ci * Wait for <domid>/<vhost>/vscsi-devs/dev-1/state become 6 15462306a36Sopenharmony_ci * Remove <domid>/<vhost>/vscsi-devs/dev-1/{state,p-dev,v-dev,p-devname} 15562306a36Sopenharmony_ci * Remove <domid>/<vhost>/vscsi-devs/dev-1/ 15662306a36Sopenharmony_ci * 15762306a36Sopenharmony_ci */ 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_ci/* Requests from the frontend to the backend */ 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci/* 16262306a36Sopenharmony_ci * Request a SCSI operation specified via a CDB in vscsiif_request.cmnd. 16362306a36Sopenharmony_ci * The target is specified via channel, id and lun. 16462306a36Sopenharmony_ci * 16562306a36Sopenharmony_ci * The operation to be performed is specified via a CDB in cmnd[], the length 16662306a36Sopenharmony_ci * of the CDB is in cmd_len. sc_data_direction specifies the direction of data 16762306a36Sopenharmony_ci * (to the device, from the device, or none at all). 16862306a36Sopenharmony_ci * 16962306a36Sopenharmony_ci * If data is to be transferred to or from the device the buffer(s) in the 17062306a36Sopenharmony_ci * guest memory is/are specified via one or multiple scsiif_request_segment 17162306a36Sopenharmony_ci * descriptors each specifying a memory page via a grant_ref_t, a offset into 17262306a36Sopenharmony_ci * the page and the length of the area in that page. All scsiif_request_segment 17362306a36Sopenharmony_ci * areas concatenated form the resulting data buffer used by the operation. 17462306a36Sopenharmony_ci * If the number of scsiif_request_segment areas is not too large (less than 17562306a36Sopenharmony_ci * or equal VSCSIIF_SG_TABLESIZE) the areas can be specified directly in the 17662306a36Sopenharmony_ci * seg[] array and the number of valid scsiif_request_segment elements is to be 17762306a36Sopenharmony_ci * set in nr_segments. 17862306a36Sopenharmony_ci * 17962306a36Sopenharmony_ci * If "feature-sg-grant" in the Xenstore is set it is possible to specify more 18062306a36Sopenharmony_ci * than VSCSIIF_SG_TABLESIZE scsiif_request_segment elements via indirection. 18162306a36Sopenharmony_ci * The maximum number of allowed scsiif_request_segment elements is the value 18262306a36Sopenharmony_ci * of the "feature-sg-grant" entry from Xenstore. When using indirection the 18362306a36Sopenharmony_ci * seg[] array doesn't contain specifications of the data buffers, but 18462306a36Sopenharmony_ci * references to scsiif_request_segment arrays, which in turn reference the 18562306a36Sopenharmony_ci * data buffers. While nr_segments holds the number of populated seg[] entries 18662306a36Sopenharmony_ci * (plus the set VSCSIIF_SG_GRANT bit), the number of scsiif_request_segment 18762306a36Sopenharmony_ci * elements referencing the target data buffers is calculated from the lengths 18862306a36Sopenharmony_ci * of the seg[] elements (the sum of all valid seg[].length divided by the 18962306a36Sopenharmony_ci * size of one scsiif_request_segment structure). The frontend may use a mix of 19062306a36Sopenharmony_ci * direct and indirect requests. 19162306a36Sopenharmony_ci */ 19262306a36Sopenharmony_ci#define VSCSIIF_ACT_SCSI_CDB 1 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci/* 19562306a36Sopenharmony_ci * Request abort of a running operation for the specified target given by 19662306a36Sopenharmony_ci * channel, id, lun and the operation's rqid in ref_rqid. 19762306a36Sopenharmony_ci */ 19862306a36Sopenharmony_ci#define VSCSIIF_ACT_SCSI_ABORT 2 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* 20162306a36Sopenharmony_ci * Request a device reset of the specified target (channel and id). 20262306a36Sopenharmony_ci */ 20362306a36Sopenharmony_ci#define VSCSIIF_ACT_SCSI_RESET 3 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci/* 20662306a36Sopenharmony_ci * Preset scatter/gather elements for a following request. Deprecated. 20762306a36Sopenharmony_ci * Keeping the define only to avoid usage of the value "4" for other actions. 20862306a36Sopenharmony_ci */ 20962306a36Sopenharmony_ci#define VSCSIIF_ACT_SCSI_SG_PRESET 4 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ci/* 21262306a36Sopenharmony_ci * Maximum scatter/gather segments per request. 21362306a36Sopenharmony_ci * 21462306a36Sopenharmony_ci * Considering balance between allocating at least 16 "vscsiif_request" 21562306a36Sopenharmony_ci * structures on one page (4096 bytes) and the number of scatter/gather 21662306a36Sopenharmony_ci * elements needed, we decided to use 26 as a magic number. 21762306a36Sopenharmony_ci * 21862306a36Sopenharmony_ci * If "feature-sg-grant" is set, more scatter/gather elements can be specified 21962306a36Sopenharmony_ci * by placing them in one or more (up to VSCSIIF_SG_TABLESIZE) granted pages. 22062306a36Sopenharmony_ci * In this case the vscsiif_request seg elements don't contain references to 22162306a36Sopenharmony_ci * the user data, but to the SG elements referencing the user data. 22262306a36Sopenharmony_ci */ 22362306a36Sopenharmony_ci#define VSCSIIF_SG_TABLESIZE 26 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci/* 22662306a36Sopenharmony_ci * based on Linux kernel 2.6.18, still valid 22762306a36Sopenharmony_ci * 22862306a36Sopenharmony_ci * Changing these values requires support of multiple protocols via the rings 22962306a36Sopenharmony_ci * as "old clients" will blindly use these values and the resulting structure 23062306a36Sopenharmony_ci * sizes. 23162306a36Sopenharmony_ci */ 23262306a36Sopenharmony_ci#define VSCSIIF_MAX_COMMAND_SIZE 16 23362306a36Sopenharmony_ci#define VSCSIIF_SENSE_BUFFERSIZE 96 23462306a36Sopenharmony_ci#define VSCSIIF_PAGE_SIZE 4096 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_cistruct scsiif_request_segment { 23762306a36Sopenharmony_ci grant_ref_t gref; 23862306a36Sopenharmony_ci uint16_t offset; 23962306a36Sopenharmony_ci uint16_t length; 24062306a36Sopenharmony_ci}; 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_ci#define VSCSIIF_SG_PER_PAGE (VSCSIIF_PAGE_SIZE / \ 24362306a36Sopenharmony_ci sizeof(struct scsiif_request_segment)) 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci/* Size of one request is 252 bytes */ 24662306a36Sopenharmony_cistruct vscsiif_request { 24762306a36Sopenharmony_ci uint16_t rqid; /* private guest value, echoed in resp */ 24862306a36Sopenharmony_ci uint8_t act; /* command between backend and frontend */ 24962306a36Sopenharmony_ci uint8_t cmd_len; /* valid CDB bytes */ 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci uint8_t cmnd[VSCSIIF_MAX_COMMAND_SIZE]; /* the CDB */ 25262306a36Sopenharmony_ci uint16_t timeout_per_command; /* deprecated */ 25362306a36Sopenharmony_ci uint16_t channel, id, lun; /* (virtual) device specification */ 25462306a36Sopenharmony_ci uint16_t ref_rqid; /* command abort reference */ 25562306a36Sopenharmony_ci uint8_t sc_data_direction; /* for DMA_TO_DEVICE(1) 25662306a36Sopenharmony_ci DMA_FROM_DEVICE(2) 25762306a36Sopenharmony_ci DMA_NONE(3) requests */ 25862306a36Sopenharmony_ci uint8_t nr_segments; /* Number of pieces of scatter-gather */ 25962306a36Sopenharmony_ci/* 26062306a36Sopenharmony_ci * flag in nr_segments: SG elements via grant page 26162306a36Sopenharmony_ci * 26262306a36Sopenharmony_ci * If VSCSIIF_SG_GRANT is set, the low 7 bits of nr_segments specify the number 26362306a36Sopenharmony_ci * of grant pages containing SG elements. Usable if "feature-sg-grant" set. 26462306a36Sopenharmony_ci */ 26562306a36Sopenharmony_ci#define VSCSIIF_SG_GRANT 0x80 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci struct scsiif_request_segment seg[VSCSIIF_SG_TABLESIZE]; 26862306a36Sopenharmony_ci uint32_t reserved[3]; 26962306a36Sopenharmony_ci}; 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci/* Size of one response is 252 bytes */ 27262306a36Sopenharmony_cistruct vscsiif_response { 27362306a36Sopenharmony_ci uint16_t rqid; /* identifies request */ 27462306a36Sopenharmony_ci uint8_t padding; 27562306a36Sopenharmony_ci uint8_t sense_len; 27662306a36Sopenharmony_ci uint8_t sense_buffer[VSCSIIF_SENSE_BUFFERSIZE]; 27762306a36Sopenharmony_ci int32_t rslt; 27862306a36Sopenharmony_ci uint32_t residual_len; /* request bufflen - 27962306a36Sopenharmony_ci return the value from physical device */ 28062306a36Sopenharmony_ci uint32_t reserved[36]; 28162306a36Sopenharmony_ci}; 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ci/* SCSI I/O status from vscsiif_response->rslt */ 28462306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_STATUS(x) ((x) & 0x00ff) 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci/* Host I/O status from vscsiif_response->rslt */ 28762306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST(x) (((x) & 0x00ff0000) >> 16) 28862306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_OK 0 28962306a36Sopenharmony_ci/* Couldn't connect before timeout */ 29062306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_NO_CONNECT 1 29162306a36Sopenharmony_ci/* Bus busy through timeout */ 29262306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_BUS_BUSY 2 29362306a36Sopenharmony_ci/* Timed out for other reason */ 29462306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_TIME_OUT 3 29562306a36Sopenharmony_ci/* Bad target */ 29662306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_BAD_TARGET 4 29762306a36Sopenharmony_ci/* Abort for some other reason */ 29862306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_ABORT 5 29962306a36Sopenharmony_ci/* Parity error */ 30062306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_PARITY 6 30162306a36Sopenharmony_ci/* Internal error */ 30262306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_ERROR 7 30362306a36Sopenharmony_ci/* Reset by somebody */ 30462306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_RESET 8 30562306a36Sopenharmony_ci/* Unexpected interrupt */ 30662306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_BAD_INTR 9 30762306a36Sopenharmony_ci/* Force command past mid-layer */ 30862306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_PASSTHROUGH 10 30962306a36Sopenharmony_ci/* Retry requested */ 31062306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_SOFT_ERROR 11 31162306a36Sopenharmony_ci/* Hidden retry requested */ 31262306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_IMM_RETRY 12 31362306a36Sopenharmony_ci/* Requeue command requested */ 31462306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_REQUEUE 13 31562306a36Sopenharmony_ci/* Transport error disrupted I/O */ 31662306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_TRANSPORT_DISRUPTED 14 31762306a36Sopenharmony_ci/* Transport class fastfailed */ 31862306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_TRANSPORT_FAILFAST 15 31962306a36Sopenharmony_ci/* Permanent target failure */ 32062306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_TARGET_FAILURE 16 32162306a36Sopenharmony_ci/* Permanent nexus failure on path */ 32262306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_NEXUS_FAILURE 17 32362306a36Sopenharmony_ci/* Space allocation on device failed */ 32462306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_ALLOC_FAILURE 18 32562306a36Sopenharmony_ci/* Medium error */ 32662306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_MEDIUM_ERROR 19 32762306a36Sopenharmony_ci/* Transport marginal errors */ 32862306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_HOST_TRANSPORT_MARGINAL 20 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ci/* Result values of reset operations */ 33162306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_RESET_SUCCESS 0x2002 33262306a36Sopenharmony_ci#define XEN_VSCSIIF_RSLT_RESET_FAILED 0x2003 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_ciDEFINE_RING_TYPES(vscsiif, struct vscsiif_request, struct vscsiif_response); 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ci#endif /*__XEN__PUBLIC_IO_SCSI_H__*/ 338