Lines Matching refs:vstor_packet
307 struct vstor_packet { struct
433 struct vstor_packet vstor_packet; member
732 struct vstor_packet *vstor_packet; in handle_multichannel_storage() local
752 vstor_packet = &request->vstor_packet; in handle_multichannel_storage()
764 vstor_packet->operation = VSTOR_OPERATION_CREATE_SUB_CHANNELS; in handle_multichannel_storage()
765 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in handle_multichannel_storage()
766 vstor_packet->sub_channel_count = num_sc; in handle_multichannel_storage()
768 ret = vmbus_sendpacket(device->channel, vstor_packet, in handle_multichannel_storage()
769 (sizeof(struct vstor_packet) - in handle_multichannel_storage()
786 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in handle_multichannel_storage()
787 vstor_packet->status != 0) { in handle_multichannel_storage()
789 vstor_packet->operation, vstor_packet->status); in handle_multichannel_storage()
801 struct vstor_packet *vstor_packet) in cache_wwn() argument
806 if (vstor_packet->wwn_packet.primary_active) { in cache_wwn()
808 wwn_to_u64(vstor_packet->wwn_packet.primary_node_wwn); in cache_wwn()
810 wwn_to_u64(vstor_packet->wwn_packet.primary_port_wwn); in cache_wwn()
813 wwn_to_u64(vstor_packet->wwn_packet.secondary_node_wwn); in cache_wwn()
815 wwn_to_u64(vstor_packet->wwn_packet.secondary_port_wwn); in cache_wwn()
824 struct vstor_packet *vstor_packet; in storvsc_execute_vstor_op() local
827 vstor_packet = &request->vstor_packet; in storvsc_execute_vstor_op()
830 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_execute_vstor_op()
832 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_execute_vstor_op()
833 (sizeof(struct vstor_packet) - in storvsc_execute_vstor_op()
848 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO || in storvsc_execute_vstor_op()
849 vstor_packet->status != 0) in storvsc_execute_vstor_op()
859 struct vstor_packet *vstor_packet; in storvsc_channel_init() local
869 vstor_packet = &request->vstor_packet; in storvsc_channel_init()
876 vstor_packet->operation = VSTOR_OPERATION_BEGIN_INITIALIZATION; in storvsc_channel_init()
886 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
887 vstor_packet->operation = in storvsc_channel_init()
890 vstor_packet->version.major_minor = in storvsc_channel_init()
896 vstor_packet->version.revision = 0; in storvsc_channel_init()
901 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO) in storvsc_channel_init()
904 if (vstor_packet->status == 0) { in storvsc_channel_init()
918 if (vstor_packet->status != 0) in storvsc_channel_init()
922 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
923 vstor_packet->operation = VSTOR_OPERATION_QUERY_PROPERTIES; in storvsc_channel_init()
933 max_chns = vstor_packet->storage_channel_properties.max_channel_cnt; in storvsc_channel_init()
956 if (vstor_packet->storage_channel_properties.flags & in storvsc_channel_init()
961 vstor_packet->storage_channel_properties.max_transfer_bytes; in storvsc_channel_init()
969 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
970 vstor_packet->operation = VSTOR_OPERATION_FCHBA_DATA; in storvsc_channel_init()
978 cache_wwn(stor_device, vstor_packet); in storvsc_channel_init()
982 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_channel_init()
983 vstor_packet->operation = VSTOR_OPERATION_END_INITIALIZATION; in storvsc_channel_init()
1085 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_command_completion()
1127 struct vstor_packet *vstor_packet, in storvsc_on_io_completion() argument
1130 struct vstor_packet *stor_pkt; in storvsc_on_io_completion()
1133 stor_pkt = &request->vstor_packet; in storvsc_on_io_completion()
1148 vstor_packet->vm_srb.scsi_status = 0; in storvsc_on_io_completion()
1149 vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS; in storvsc_on_io_completion()
1154 stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status; in storvsc_on_io_completion()
1155 stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status; in storvsc_on_io_completion()
1158 if (vstor_packet->vm_srb.sense_info_length > sense_buffer_size) in storvsc_on_io_completion()
1159 vstor_packet->vm_srb.sense_info_length = sense_buffer_size; in storvsc_on_io_completion()
1162 vstor_packet->vm_srb.sense_info_length; in storvsc_on_io_completion()
1164 if (vstor_packet->vm_srb.scsi_status != 0 || in storvsc_on_io_completion()
1165 vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) in storvsc_on_io_completion()
1169 vstor_packet->vm_srb.scsi_status, in storvsc_on_io_completion()
1170 vstor_packet->vm_srb.srb_status); in storvsc_on_io_completion()
1172 if ((vstor_packet->vm_srb.scsi_status & 0xFF) == 0x02) { in storvsc_on_io_completion()
1174 if (vstor_packet->vm_srb.srb_status & in storvsc_on_io_completion()
1180 request, vstor_packet->vm_srb.sense_info_length); in storvsc_on_io_completion()
1183 vstor_packet->vm_srb.sense_data, in storvsc_on_io_completion()
1184 vstor_packet->vm_srb.sense_info_length); in storvsc_on_io_completion()
1190 vstor_packet->vm_srb.data_transfer_length; in storvsc_on_io_completion()
1202 struct vstor_packet *vstor_packet, in storvsc_on_receive() argument
1206 switch (vstor_packet->operation) { in storvsc_on_receive()
1208 storvsc_on_io_completion(stor_device, vstor_packet, request); in storvsc_on_receive()
1219 cache_wwn(stor_device, vstor_packet); in storvsc_on_receive()
1255 memcpy(&request->vstor_packet, packet, in storvsc_on_channel_callback()
1256 (sizeof(struct vstor_packet) - vmscsi_size_delta)); in storvsc_on_channel_callback()
1379 struct vstor_packet *vstor_packet; in storvsc_do_io() local
1386 vstor_packet = &request->vstor_packet; in storvsc_do_io()
1465 vstor_packet->flags |= REQUEST_COMPLETION_FLAG; in storvsc_do_io()
1467 vstor_packet->vm_srb.length = (sizeof(struct vmscsi_request) - in storvsc_do_io()
1471 vstor_packet->vm_srb.sense_info_length = sense_buffer_size; in storvsc_do_io()
1474 vstor_packet->vm_srb.data_transfer_length = in storvsc_do_io()
1477 vstor_packet->operation = VSTOR_OPERATION_EXECUTE_SRB; in storvsc_do_io()
1483 vstor_packet, in storvsc_do_io()
1484 (sizeof(struct vstor_packet) - in storvsc_do_io()
1488 ret = vmbus_sendpacket(outgoing_channel, vstor_packet, in storvsc_do_io()
1489 (sizeof(struct vstor_packet) - in storvsc_do_io()
1576 struct vstor_packet *vstor_packet; in storvsc_host_reset_handler() local
1585 vstor_packet = &request->vstor_packet; in storvsc_host_reset_handler()
1586 memset(vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_host_reset_handler()
1590 vstor_packet->operation = VSTOR_OPERATION_RESET_BUS; in storvsc_host_reset_handler()
1591 vstor_packet->flags = REQUEST_COMPLETION_FLAG; in storvsc_host_reset_handler()
1592 vstor_packet->vm_srb.path_id = stor_device->path_id; in storvsc_host_reset_handler()
1594 ret = vmbus_sendpacket(device->channel, vstor_packet, in storvsc_host_reset_handler()
1595 (sizeof(struct vstor_packet) - in storvsc_host_reset_handler()
1690 memset(&cmd_request->vstor_packet, 0, sizeof(struct vstor_packet)); in storvsc_queuecommand()
1691 vm_srb = &cmd_request->vstor_packet.vm_srb; in storvsc_queuecommand()
2152 sizeof(struct vstor_packet) + sizeof(u64) - in storvsc_drv_init()