Lines Matching refs:vstor_packet
296 struct vstor_packet { struct
408 struct vstor_packet vstor_packet; member
618 struct vstor_packet *vstor_packet; in handle_multichannel_storage() local
627 vstor_packet = &request->vstor_packet; in handle_multichannel_storage()
649 vstor_packet->operation = VSTOR_OPERATION_CREATE_SUB_CHANNELS; in handle_multichannel_storage()
650 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in handle_multichannel_storage()
651 vstor_packet->sub_channel_count = num_sc; in handle_multichannel_storage()
653 ret = vmbus_sendpacket(device->channel, vstor_packet, in handle_multichannel_storage()
654 (sizeof(struct vstor_packet) - in handle_multichannel_storage()
667 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in handle_multichannel_storage()
668 vstor_packet->status != 0) in handle_multichannel_storage()
683 struct vstor_packet *vstor_packet; in storvsc_channel_init() local
693 vstor_packet = &request->vstor_packet; in storvsc_channel_init()
701 vstor_packet->operation = VSTOR_OPERATION_BEGIN_INITIALIZATION; in storvsc_channel_init()
702 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_channel_init()
704 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_channel_init()
705 (sizeof(struct vstor_packet) - in storvsc_channel_init()
719 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in storvsc_channel_init()
720 vstor_packet->status != 0) { in storvsc_channel_init()
728 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
729 vstor_packet->operation = in storvsc_channel_init()
731 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_channel_init()
733 vstor_packet->version.major_minor = in storvsc_channel_init()
739 vstor_packet->version.revision = 0; in storvsc_channel_init()
741 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_channel_init()
742 (sizeof(struct vstor_packet) - in storvsc_channel_init()
756 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO) { in storvsc_channel_init()
761 if (vstor_packet->status == 0) { in storvsc_channel_init()
775 if (vstor_packet->status != 0) { in storvsc_channel_init()
781 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
782 vstor_packet->operation = VSTOR_OPERATION_QUERY_PROPERTIES; in storvsc_channel_init()
783 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_channel_init()
785 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_channel_init()
786 (sizeof(struct vstor_packet) - in storvsc_channel_init()
801 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in storvsc_channel_init()
802 vstor_packet->status != 0) { in storvsc_channel_init()
812 max_chns = vstor_packet->storage_channel_properties.max_channel_cnt; in storvsc_channel_init()
814 if (vstor_packet->storage_channel_properties.flags & in storvsc_channel_init()
819 vstor_packet->storage_channel_properties.max_transfer_bytes; in storvsc_channel_init()
821 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
822 vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION; in storvsc_channel_init()
823 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_channel_init()
825 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_channel_init()
826 (sizeof(struct vstor_packet) - in storvsc_channel_init()
841 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in storvsc_channel_init()
842 vstor_packet->status != 0) { in storvsc_channel_init()
939 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_command_completion()
966 struct vstor_packet *vstor_packet, in storvsc_on_io_completion() argument
970 struct vstor_packet *stor_pkt; in storvsc_on_io_completion()
973 stor_pkt = &request->vstor_packet; in storvsc_on_io_completion()
988 vstor_packet->vm_srb.scsi_status = 0; in storvsc_on_io_completion()
989 vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS; in storvsc_on_io_completion()
994 stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; in storvsc_on_io_completion()
995 stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; in storvsc_on_io_completion()
997 vstor_packet->vm_srb.sense_info_length; in storvsc_on_io_completion()
1000 if ((vstor_packet->vm_srb.scsi_status & 0xFF) == 0x02) { in storvsc_on_io_completion()
1002 if (vstor_packet->vm_srb.srb_status & in storvsc_on_io_completion()
1007 vstor_packet->vm_srb.sense_data, in storvsc_on_io_completion()
1008 vstor_packet->vm_srb.sense_info_length); in storvsc_on_io_completion()
1014 vstor_packet->vm_srb.data_transfer_length; in storvsc_on_io_completion()
1026 struct vstor_packet *vstor_packet, in storvsc_on_receive() argument
1032 switch (vstor_packet->operation) { in storvsc_on_receive()
1034 storvsc_on_io_completion(device, vstor_packet, request); in storvsc_on_receive()
1061 unsigned char packet[ALIGN(sizeof(struct vstor_packet), 8)]; in storvsc_on_channel_callback()
1076 ALIGN((sizeof(struct vstor_packet) - in storvsc_on_channel_callback()
1087 memcpy(&request->vstor_packet, packet, in storvsc_on_channel_callback()
1088 (sizeof(struct vstor_packet) - in storvsc_on_channel_callback()
1093 (struct vstor_packet *)packet, in storvsc_on_channel_callback()
1167 struct vstor_packet *vstor_packet; in storvsc_do_io() local
1171 vstor_packet = &request->vstor_packet; in storvsc_do_io()
1186 vstor_packet->flags |= REQUEST_COMPLETION_FLAG; in storvsc_do_io()
1188 vstor_packet->vm_srb.length = (sizeof(struct vmscsi_request) - in storvsc_do_io()
1192 vstor_packet->vm_srb.sense_info_length = sense_buffer_size; in storvsc_do_io()
1195 vstor_packet->vm_srb.data_transfer_length = in storvsc_do_io()
1198 vstor_packet->operation = VSTOR_OPERATION_EXECUTE_SRB; in storvsc_do_io()
1204 vstor_packet, in storvsc_do_io()
1205 (sizeof(struct vstor_packet) - in storvsc_do_io()
1209 ret = vmbus_sendpacket(outgoing_channel, vstor_packet, in storvsc_do_io()
1210 (sizeof(struct vstor_packet) - in storvsc_do_io()
1297 struct vstor_packet *vstor_packet; in storvsc_host_reset_handler() local
1306 vstor_packet = &request->vstor_packet; in storvsc_host_reset_handler()
1310 vstor_packet->operation = VSTOR_OPERATION_RESET_BUS; in storvsc_host_reset_handler()
1311 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_host_reset_handler()
1312 vstor_packet->vm_srb.path_id = stor_device->path_id; in storvsc_host_reset_handler()
1314 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_host_reset_handler()
1315 (sizeof(struct vstor_packet) - in storvsc_host_reset_handler()
1406 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_queuecommand()
1705 sizeof(struct vstor_packet) + sizeof(u64) - in storvsc_drv_init()