Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/storvsc/hv_vstorage.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define VMSTOR_INVALID_PROTOCOL_VERSION -1 | #define VMSTOR_INVALID_PROTOCOL_VERSION -1 | ||||
/* | /* | ||||
* Version history: | * Version history: | ||||
* V1 Beta 0.1 | * V1 Beta 0.1 | ||||
* V1 RC < 2008/1/31 1.0 | * V1 RC < 2008/1/31 1.0 | ||||
* V1 RC > 2008/1/31 2.0 | * V1 RC > 2008/1/31 2.0 | ||||
* Win7: 4.2 | |||||
* Win8: 5.1 | |||||
*/ | */ | ||||
#define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(5, 1) | #define VMSTOR_PROTOCOL_VERSION_CURRENT VMSTOR_PROTOCOL_VERSION(5, 1) | ||||
/** | /** | ||||
* Packet structure ops describing virtual storage requests. | * Packet structure ops describing virtual storage requests. | ||||
*/ | */ | ||||
enum vstor_packet_ops { | enum vstor_packet_ops { | ||||
Show All 16 Lines | |||||
/* | /* | ||||
* Platform neutral description of a scsi request - | * Platform neutral description of a scsi request - | ||||
* this remains the same across the write regardless of 32/64 bit | * this remains the same across the write regardless of 32/64 bit | ||||
* note: it's patterned off the Windows DDK SCSI_PASS_THROUGH structure | * note: it's patterned off the Windows DDK SCSI_PASS_THROUGH structure | ||||
*/ | */ | ||||
#define CDB16GENERIC_LENGTH 0x10 | #define CDB16GENERIC_LENGTH 0x10 | ||||
#define SENSE_BUFFER_SIZE 0x12 | #define SENSE_BUFFER_SIZE 0x14 | ||||
#define MAX_DATA_BUFFER_LENGTH_WITH_PADDING 0x14 | #define MAX_DATA_BUFFER_LENGTH_WITH_PADDING 0x14 | ||||
#define POST_WIN7_STORVSC_SENSE_BUFFER_SIZE 0x14 | |||||
#define PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE 0x12 | |||||
struct vmscsi_win8_extension { | |||||
/* | |||||
* The following were added in Windows 8 | |||||
*/ | |||||
uint16_t reserve; | |||||
uint8_t queue_tag; | |||||
uint8_t queue_action; | |||||
uint32_t srb_flags; | |||||
uint32_t time_out_value; | |||||
uint32_t queue_sort_ey; | |||||
} __packed; | |||||
struct vmscsi_req { | struct vmscsi_req { | ||||
uint16_t length; | uint16_t length; | ||||
uint8_t srb_status; | uint8_t srb_status; | ||||
uint8_t scsi_status; | uint8_t scsi_status; | ||||
/* HBA number, set to the order number detected by initiator. */ | /* HBA number, set to the order number detected by initiator. */ | ||||
uint8_t port; | uint8_t port; | ||||
/* SCSI bus number or bus_id, different from CAM's path_id. */ | /* SCSI bus number or bus_id, different from CAM's path_id. */ | ||||
Show All 11 Lines | struct vmscsi_req { | ||||
union { | union { | ||||
uint8_t cdb[CDB16GENERIC_LENGTH]; | uint8_t cdb[CDB16GENERIC_LENGTH]; | ||||
uint8_t sense_data[SENSE_BUFFER_SIZE]; | uint8_t sense_data[SENSE_BUFFER_SIZE]; | ||||
uint8_t reserved_array[MAX_DATA_BUFFER_LENGTH_WITH_PADDING]; | uint8_t reserved_array[MAX_DATA_BUFFER_LENGTH_WITH_PADDING]; | ||||
} u; | } u; | ||||
/* | |||||
* The following was added in win8. | |||||
*/ | |||||
struct vmscsi_win8_extension win8_extension; | |||||
} __packed; | } __packed; | ||||
/** | /** | ||||
* This structure is sent during the initialization phase to get the different | * This structure is sent during the initialization phase to get the different | ||||
* properties of the channel. | * properties of the channel. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |