Lines Matching refs:desc
213 static inline void mts_debug_dump(struct mts_desc* desc) { in mts_debug_dump() argument
215 (int)desc, in mts_debug_dump()
216 (int)desc->usb_dev->toggle[1],(int)desc->usb_dev->toggle[0] in mts_debug_dump()
219 usb_sndbulkpipe(desc->usb_dev,desc->ep_out), in mts_debug_dump()
220 usb_rcvbulkpipe(desc->usb_dev,desc->ep_response), in mts_debug_dump()
221 usb_rcvbulkpipe(desc->usb_dev,desc->ep_image) in mts_debug_dump()
318 static inline void mts_urb_abort(struct mts_desc* desc) { in mts_urb_abort() argument
320 mts_debug_dump(desc); in mts_urb_abort()
322 usb_kill_urb( desc->urb ); in mts_urb_abort()
339 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort() local
343 mts_urb_abort(desc); in mts_scsi_abort()
350 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset() local
354 mts_debug_dump(desc); in mts_scsi_host_reset()
356 result = usb_lock_device_for_reset(desc->usb_dev, desc->usb_intf); in mts_scsi_host_reset()
358 result = usb_reset_device(desc->usb_dev); in mts_scsi_host_reset()
359 usb_unlock_device(desc->usb_dev); in mts_scsi_host_reset()
528 mts_build_transfer_context(struct scsi_cmnd *srb, struct mts_desc* desc) in mts_build_transfer_context() argument
534 desc->context.instance = desc; in mts_build_transfer_context()
535 desc->context.srb = srb; in mts_build_transfer_context()
538 desc->context.data = NULL; in mts_build_transfer_context()
539 desc->context.data_length = 0; in mts_build_transfer_context()
542 desc->context.curr_sg = scsi_sglist(srb); in mts_build_transfer_context()
543 desc->context.data = sg_virt(desc->context.curr_sg); in mts_build_transfer_context()
544 desc->context.data_length = desc->context.curr_sg->length; in mts_build_transfer_context()
553 ) { pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_image); in mts_build_transfer_context()
555 (int)desc->ep_image ); in mts_build_transfer_context()
557 pipe = usb_rcvbulkpipe(desc->usb_dev,desc->ep_response); in mts_build_transfer_context()
559 (int)desc->ep_response); in mts_build_transfer_context()
562 (int)desc->ep_out); in mts_build_transfer_context()
563 pipe = usb_sndbulkpipe(desc->usb_dev,desc->ep_out); in mts_build_transfer_context()
565 desc->context.data_pipe = pipe; in mts_build_transfer_context()
571 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_queuecommand_lck() local
576 mts_debug_dump(desc); in mts_scsi_queuecommand_lck()
593 usb_fill_bulk_urb(desc->urb, in mts_scsi_queuecommand_lck()
594 desc->usb_dev, in mts_scsi_queuecommand_lck()
595 usb_sndbulkpipe(desc->usb_dev,desc->ep_out), in mts_scsi_queuecommand_lck()
599 &desc->context in mts_scsi_queuecommand_lck()
603 mts_build_transfer_context( srb, desc ); in mts_scsi_queuecommand_lck()
604 desc->context.final_callback = callback; in mts_scsi_queuecommand_lck()
607 res=usb_submit_urb(desc->urb, GFP_ATOMIC); in mts_scsi_queuecommand_lck()
690 if ( altsetting->desc.bNumEndpoints != MTS_EP_TOTAL ) { in mts_usb_probe()
692 (int)MTS_EP_TOTAL, (int)altsetting->desc.bNumEndpoints ); in mts_usb_probe()
696 for( i = 0; i < altsetting->desc.bNumEndpoints; i++ ) { in mts_usb_probe()
697 if ((altsetting->endpoint[i].desc.bmAttributes & in mts_usb_probe()
701 (int)altsetting->endpoint[i].desc.bEndpointAddress ); in mts_usb_probe()
703 if (altsetting->endpoint[i].desc.bEndpointAddress & in mts_usb_probe()
706 = altsetting->endpoint[i].desc.bEndpointAddress & in mts_usb_probe()
714 ep_out = altsetting->endpoint[i].desc.bEndpointAddress & in mts_usb_probe()
793 struct mts_desc *desc = usb_get_intfdata(intf); in mts_usb_disconnect() local
797 usb_kill_urb(desc->urb); in mts_usb_disconnect()
798 scsi_remove_host(desc->host); in mts_usb_disconnect()
800 scsi_host_put(desc->host); in mts_usb_disconnect()
801 usb_free_urb(desc->urb); in mts_usb_disconnect()
802 kfree(desc->context.scsi_status); in mts_usb_disconnect()
803 kfree(desc); in mts_usb_disconnect()