/* * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE.
*/
/* Default values of the CDB and sense data size configuration fields */ #define VIRTIO_SCSI_CDB_DEFAULT_SIZE 32 #define VIRTIO_SCSI_SENSE_DEFAULT_SIZE 96
/* SCSI command request, followed by data-out */ struct virtio_scsi_cmd_req {
__u8 lun[8]; /* Logical Unit Number */
__virtio64 tag; /* Command identifier */
__u8 task_attr; /* Task attribute */
__u8 prio; /* SAM command priority field */
__u8 crn;
__u8 cdb[VIRTIO_SCSI_CDB_SIZE];
} __attribute__((packed));
/* SCSI command request, followed by protection information */ struct virtio_scsi_cmd_req_pi {
__u8 lun[8]; /* Logical Unit Number */
__virtio64 tag; /* Command identifier */
__u8 task_attr; /* Task attribute */
__u8 prio; /* SAM command priority field */
__u8 crn;
__virtio32 pi_bytesout; /* DataOUT PI Number of bytes */
__virtio32 pi_bytesin; /* DataIN PI Number of bytes */
__u8 cdb[VIRTIO_SCSI_CDB_SIZE];
} __attribute__((packed));
/* Response, followed by sense data and data-in */ struct virtio_scsi_cmd_resp {
__virtio32 sense_len; /* Sense data length */
__virtio32 resid; /* Residual bytes in data buffer */
__virtio16 status_qualifier; /* Status qualifier */
__u8 status; /* Command completion status */
__u8 response; /* Response values */
__u8 sense[VIRTIO_SCSI_SENSE_SIZE];
} __attribute__((packed));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.