• Home
  • Raw
  • Download

Lines Matching refs:srb

225 static inline void mts_show_command(struct scsi_cmnd *srb)  in mts_show_command()  argument
229 switch (srb->cmnd[0]) { in mts_show_command()
299 MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len); in mts_show_command()
302 MTS_DEBUG( " %10ph\n", srb->cmnd); in mts_show_command()
336 static int mts_scsi_abort(struct scsi_cmnd *srb) in mts_scsi_abort() argument
338 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort()
347 static int mts_scsi_host_reset(struct scsi_cmnd *srb) in mts_scsi_host_reset() argument
349 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset()
364 mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb);
395 context->srb->result = DID_ERROR << 16; in mts_int_submit_urb()
407 context->final_callback(context->srb); in mts_transfer_cleanup()
414 context->srb->result &= MTS_SCSI_ERR_MASK; in mts_transfer_done()
415 context->srb->result |= (unsigned)(*context->scsi_status)<<1; in mts_transfer_done()
441 scsi_set_resid(context->srb, context->data_length - in mts_data_done()
444 context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; in mts_data_done()
461 context->srb->result = DID_ABORT<<16; in mts_command_done()
466 context->srb->result = DID_ERROR<<16; in mts_command_done()
473 if (context->srb->cmnd[0] == REQUEST_SENSE) { in mts_command_done()
476 context->srb->sense_buffer, in mts_command_done()
484 scsi_sg_count(context->srb) > 1 ? in mts_command_done()
499 scsi_sg_count(context->srb)); in mts_do_sg()
502 context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; in mts_do_sg()
506 sg = scsi_sglist(context->srb); in mts_do_sg()
512 context->fragment + 1 == scsi_sg_count(context->srb) ? in mts_do_sg()
529 mts_build_transfer_context(struct scsi_cmnd *srb, struct mts_desc* desc) in mts_build_transfer_context() argument
537 desc->context.srb = srb; in mts_build_transfer_context()
540 if (!scsi_bufflen(srb)) { in mts_build_transfer_context()
545 sg = scsi_sglist(srb); in mts_build_transfer_context()
555 if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len ) in mts_build_transfer_context()
559 } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) { in mts_build_transfer_context()
573 mts_scsi_queuecommand_lck(struct scsi_cmnd *srb, mts_scsi_cmnd_callback callback) in mts_scsi_queuecommand_lck() argument
575 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_queuecommand_lck()
580 mts_show_command(srb); in mts_scsi_queuecommand_lck()
583 if ( srb->device->lun || srb->device->id || srb->device->channel ) { in mts_scsi_queuecommand_lck()
585 …d to LUN=%d ID=%d CHANNEL=%d from SCSI layer\n",(int)srb->device->lun,(int)srb->device->id, (int)s… in mts_scsi_queuecommand_lck()
589 srb->result = DID_BAD_TARGET << 16; in mts_scsi_queuecommand_lck()
592 callback(srb); in mts_scsi_queuecommand_lck()
601 srb->cmnd, in mts_scsi_queuecommand_lck()
602 srb->cmd_len, in mts_scsi_queuecommand_lck()
608 mts_build_transfer_context( srb, desc ); in mts_scsi_queuecommand_lck()
616 srb->result = DID_ERROR << 16; in mts_scsi_queuecommand_lck()
619 callback(srb); in mts_scsi_queuecommand_lck()