Lines Matching refs:cmd

595 static int orc_device_reset(struct orc_host * host, struct scsi_cmnd *cmd, unsigned int target)  in orc_device_reset()  argument
617 if (host_scb->status && escb->srb == cmd) in orc_device_reset()
649 escb->srb = cmd; in orc_device_reset()
762 static int inia100_abort_cmd(struct orc_host * host, struct scsi_cmnd *cmd) in inia100_abort_cmd() argument
779 if (scb->status && escb->srb == cmd) { in inia100_abort_cmd()
842 static int inia100_build_scb(struct orc_host * host, struct orc_scb * scb, struct scsi_cmnd * cmd) in inia100_build_scb() argument
851 escb->srb = cmd; in inia100_build_scb()
857 scb->target = cmd->device->id; in inia100_build_scb()
858 scb->lun = cmd->device->lun; in inia100_build_scb()
863 scb->xferlen = cpu_to_le32((u32) scsi_bufflen(cmd)); in inia100_build_scb()
866 count_sg = scsi_dma_map(cmd); in inia100_build_scb()
874 scsi_for_each_sg(cmd, sg, count_sg, i) { in inia100_build_scb()
889 scb->cdb_len = cmd->cmd_len; in inia100_build_scb()
891 printk("max cdb length= %x\n", cmd->cmd_len); in inia100_build_scb()
894 scb->ident = (u8)(cmd->device->lun & 0xff) | DISC_ALLOW; in inia100_build_scb()
895 if (cmd->device->tagged_supported) { /* Tag Support */ in inia100_build_scb()
900 memcpy(scb->cdb, cmd->cmnd, scb->cdb_len); in inia100_build_scb()
912 static int inia100_queue_lck(struct scsi_cmnd *cmd) in inia100_queue_lck() argument
917 host = (struct orc_host *) cmd->device->host->hostdata; in inia100_queue_lck()
922 if (inia100_build_scb(host, scb, cmd)) { in inia100_queue_lck()
940 static int inia100_abort(struct scsi_cmnd * cmd) in DEF_SCSI_QCMD()
944 host = (struct orc_host *) cmd->device->host->hostdata; in DEF_SCSI_QCMD()
945 return inia100_abort_cmd(host, cmd); in DEF_SCSI_QCMD()
956 static int inia100_bus_reset(struct scsi_cmnd * cmd) in inia100_bus_reset() argument
959 host = (struct orc_host *) cmd->device->host->hostdata; in inia100_bus_reset()
970 static int inia100_device_reset(struct scsi_cmnd * cmd) in inia100_device_reset() argument
973 host = (struct orc_host *) cmd->device->host->hostdata; in inia100_device_reset()
974 return orc_device_reset(host, cmd, scmd_id(cmd)); in inia100_device_reset()
990 struct scsi_cmnd *cmd; /* Pointer to SCSI request block */ in inia100_scb_handler() local
994 if ((cmd = (struct scsi_cmnd *) escb->srb) == NULL) { in inia100_scb_handler()
1037 memcpy((unsigned char *) &cmd->sense_buffer[0], in inia100_scb_handler()
1040 cmd->result = scb->tastat | (scb->hastat << 16); in inia100_scb_handler()
1041 scsi_dma_unmap(cmd); in inia100_scb_handler()
1042 scsi_done(cmd); /* Notify system DONE */ in inia100_scb_handler()