vstor_packet
vm_srb = &cmd_request->vstor_packet.vm_srb;
struct vstor_packet *vstor_packet,
struct vstor_packet *stor_pkt;
stor_pkt = &request->vstor_packet;
vstor_packet->vm_srb.scsi_status = 0;
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status;
vstor_packet->vm_srb.sense_info_length);
if (vstor_packet->vm_srb.scsi_status != 0 ||
vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) {
vstor_packet->vm_srb.scsi_status,
vstor_packet->vm_srb.srb_status,
vstor_packet->status);
if (vstor_packet->vm_srb.scsi_status == SAM_STAT_CHECK_CONDITION &&
(vstor_packet->vm_srb.srb_status & SRB_STATUS_AUTOSENSE_VALID))
vstor_packet->vm_srb.sense_data,
vstor_packet->vm_srb.data_transfer_length;
struct vstor_packet *vstor_packet,
switch (vstor_packet->operation) {
storvsc_on_io_completion(stor_device, vstor_packet, request);
cache_wwn(stor_device, vstor_packet);
struct vstor_packet *packet = hv_pkt_data(desc);
u32 minlen = rqst_id ? sizeof(struct vstor_packet) :
memcpy(&request->vstor_packet, packet,
sizeof(struct vstor_packet));
struct vstor_packet *vstor_packet;
vstor_packet = &request->vstor_packet;
vstor_packet->flags |= REQUEST_COMPLETION_FLAG;
vstor_packet->vm_srb.length = sizeof(struct vmscsi_request);
vstor_packet->vm_srb.sense_info_length = STORVSC_SENSE_BUFFER_SIZE;
vstor_packet->vm_srb.data_transfer_length =
vstor_packet->operation = VSTOR_OPERATION_EXECUTE_SRB;
vstor_packet,
sizeof(struct vstor_packet),
ret = vmbus_sendpacket(outgoing_channel, vstor_packet,
sizeof(struct vstor_packet),
struct vstor_packet *vstor_packet;
vstor_packet = &request->vstor_packet;
memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation = VSTOR_OPERATION_RESET_BUS;
vstor_packet->flags = REQUEST_COMPLETION_FLAG;
vstor_packet->vm_srb.path_id = stor_device->path_id;
ret = vmbus_sendpacket(device->channel, vstor_packet,
sizeof(struct vstor_packet),
memset(&cmd_request->vstor_packet, 0, sizeof(struct vstor_packet));
vm_srb = &cmd_request->vstor_packet.vm_srb;
sizeof(struct vstor_packet) + sizeof(u64),
sizeof(struct vstor_packet))
struct vstor_packet vstor_packet;
struct vstor_packet *vstor_packet;
vstor_packet = &request->vstor_packet;
vstor_packet->operation = VSTOR_OPERATION_CREATE_SUB_CHANNELS;
vstor_packet->flags = REQUEST_COMPLETION_FLAG;
vstor_packet->sub_channel_count = num_sc;
ret = vmbus_sendpacket(device->channel, vstor_packet,
sizeof(struct vstor_packet),
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
vstor_packet->status != 0) {
vstor_packet->operation, vstor_packet->status);
struct vstor_packet *vstor_packet)
if (vstor_packet->wwn_packet.primary_active) {
wwn_to_u64(vstor_packet->wwn_packet.primary_node_wwn);
wwn_to_u64(vstor_packet->wwn_packet.primary_port_wwn);
wwn_to_u64(vstor_packet->wwn_packet.secondary_node_wwn);
wwn_to_u64(vstor_packet->wwn_packet.secondary_port_wwn);
struct vstor_packet *vstor_packet;
vstor_packet = &request->vstor_packet;
vstor_packet->flags = REQUEST_COMPLETION_FLAG;
ret = vmbus_sendpacket(device->channel, vstor_packet,
sizeof(struct vstor_packet),
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
vstor_packet->status != 0)
struct vstor_packet *vstor_packet;
vstor_packet = &request->vstor_packet;
vstor_packet->operation = VSTOR_OPERATION_BEGIN_INITIALIZATION;
memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation =
vstor_packet->version.major_minor = protocol_version[i];
vstor_packet->version.revision = 0;
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO)
if (vstor_packet->status == 0) {
if (vstor_packet->status != 0) {
memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation = VSTOR_OPERATION_QUERY_PROPERTIES;
max_chns = vstor_packet->storage_channel_properties.max_channel_cnt;
if (vstor_packet->storage_channel_properties.flags &
vstor_packet->storage_channel_properties.max_transfer_bytes;
memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation = VSTOR_OPERATION_FCHBA_DATA;
cache_wwn(stor_device, vstor_packet);
memset(vstor_packet, 0, sizeof(struct vstor_packet));
vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION;