#ifndef SPDK_SCSI_SPEC_H
#define SPDK_SCSI_SPEC_H
-#include <stdint.h>
+#include "spdk/stdinc.h"
#include "spdk/assert.h"
SPDK_SCSI_ASC_LOGICAL_UNIT_NOT_SUPPORTED = 0x25,
SPDK_SCSI_ASC_WRITE_PROTECTED = 0x27,
SPDK_SCSI_ASC_FORMAT_COMMAND_FAILED = 0x31,
+ SPDK_SCSI_ASC_SAVING_PARAMETERS_NOT_SUPPORTED = 0x39,
SPDK_SCSI_ASC_INTERNAL_TARGET_FAILURE = 0x44,
};
SPDK_SBC_VL_XPWRITE_32 = 0x0006,
};
+#define SPDK_SBC_START_STOP_UNIT_START_BIT (1 << 0)
+
enum spdk_mmc_opcode {
/* MMC6 */
SPDK_MMC_READ_DISC_STRUCTURE = 0xad,
SPDK_SPC_VPD_BLOCK_THIN_PROVISION = 0xb2,
};
+enum spdk_spc_peripheral_qualifier {
+ SPDK_SPC_PERIPHERAL_QUALIFIER_CONNECTED = 0,
+ SPDK_SPC_PERIPHERAL_QUALIFIER_NOT_CONNECTED = 1,
+ SPDK_SPC_PERIPHERAL_QUALIFIER_NOT_CAPABLE = 3,
+};
+
enum {
SPDK_SPC_PERIPHERAL_DEVICE_TYPE_DISK = 0x00,
SPDK_SPC_PERIPHERAL_DEVICE_TYPE_TAPE = 0x01,
SPDK_STATIC_ASSERT(sizeof(struct spdk_scsi_cdb_inquiry) == 6, "incorrect CDB size");
struct spdk_scsi_cdb_inquiry_data {
- uint8_t peripheral;
+ uint8_t peripheral_device_type : 5;
+ uint8_t peripheral_qualifier : 3;
uint8_t rmb;
uint8_t version;
uint8_t response;
};
struct spdk_scsi_vpd_page {
- uint8_t peripheral;
+ uint8_t peripheral_device_type : 5;
+ uint8_t peripheral_qualifier : 3;
uint8_t page_code;
uint8_t alloc_len[2];
uint8_t params[];
uint32_t reserved;
};
-#define SPDK_SCSI_UNMAP_LBPU 1 << 7
+#define SPDK_SCSI_UNMAP_LBPU 1 << 7
#define SPDK_SCSI_UNMAP_LBPWS 1 << 6
#define SPDK_SCSI_UNMAP_LBPWS10 1 << 5