Lines Matching refs:context
196 MTS_DEBUG("transfer = 0x%x context = 0x%x\n",(int)transfer,(int)context ); \
197 …MTS_DEBUG("status = 0x%x data-length = 0x%x sent = 0x%x\n",(int)transfer->status,(int)context->dat…
198 mts_debug_dump(context->instance);\
213 struct mts_transfer_context* context = (struct mts_transfer_context*)transfer->context; \
505 context->instance->usb_dev, in mts_int_submit_urb()
510 context in mts_int_submit_urb()
518 context->srb->result = DID_ERROR << 16; in mts_int_submit_urb()
530 if ( context->final_callback ) in mts_transfer_cleanup()
531 context->final_callback(context->srb); in mts_transfer_cleanup()
539 context->srb->result &= MTS_SCSI_ERR_MASK; in mts_transfer_done()
540 context->srb->result |= (unsigned)context->status<<1; in mts_transfer_done()
554 usb_rcvbulkpipe(context->instance->usb_dev, in mts_get_status()
555 context->instance->ep_response), in mts_get_status()
556 &context->status, in mts_get_status()
566 if ( context->data_length != transfer->actual_length ) { in mts_data_done()
567 context->srb->resid = context->data_length - transfer->actual_length; in mts_data_done()
569 context->srb->result = (transfer->status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; in mts_data_done()
587 context->srb->result = DID_ABORT<<16; in mts_command_done()
592 context->srb->result = DID_ERROR<<16; in mts_command_done()
599 if ( context->data ) { in mts_command_done()
601 context->data_pipe, in mts_command_done()
602 context->data, in mts_command_done()
603 context->data_length, in mts_command_done()
604 context->srb->use_sg ? mts_do_sg : mts_data_done); in mts_command_done()
615 MTS_DEBUG("Processing fragment %d of %d\n", context->fragment,context->srb->use_sg); in mts_do_sg()
618 context->srb->result = (transfer->status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; in mts_do_sg()
622 sg = context->srb->buffer; in mts_do_sg()
623 context->fragment++; in mts_do_sg()
625 context->data_pipe, in mts_do_sg()
626 sg[context->fragment].address, in mts_do_sg()
627 sg[context->fragment].length, in mts_do_sg()
628 context->fragment + 1 == context->srb->use_sg ? mts_data_done : mts_do_sg); in mts_do_sg()
652 desc->context.instance = desc; in mts_build_transfer_context()
653 desc->context.srb = srb; in mts_build_transfer_context()
654 desc->context.fragment = 0; in mts_build_transfer_context()
658 desc->context.data = 0; in mts_build_transfer_context()
659 desc->context.data_length = 0; in mts_build_transfer_context()
662 desc->context.data = srb->buffer; in mts_build_transfer_context()
663 desc->context.data_length = srb->bufflen; in mts_build_transfer_context()
670 desc->context.data = sg[0].address; in mts_build_transfer_context()
671 desc->context.data_length = sg[0].length; in mts_build_transfer_context()
692 desc->context.data_pipe = pipe; in mts_build_transfer_context()
728 &desc->context in mts_scsi_queuecommand()
733 desc->context.final_callback = callback; in mts_scsi_queuecommand()