Lines Matching refs:cmd

69 static int mac53c94_queue_lck(struct scsi_cmnd *cmd)  in mac53c94_queue_lck()  argument
74 if (cmd->sc_data_direction == DMA_TO_DEVICE) { in mac53c94_queue_lck()
76 printk(KERN_DEBUG "mac53c94_queue %p: command is", cmd); in mac53c94_queue_lck()
77 for (i = 0; i < cmd->cmd_len; ++i) in mac53c94_queue_lck()
78 printk(KERN_CONT " %.2x", cmd->cmnd[i]); in mac53c94_queue_lck()
81 scsi_sg_count(cmd), scsi_bufflen(cmd), scsi_sglist(cmd)); in mac53c94_queue_lck()
85 cmd->host_scribble = NULL; in mac53c94_queue_lck()
87 state = (struct fsc_state *) cmd->device->host->hostdata; in mac53c94_queue_lck()
90 state->request_q = cmd; in mac53c94_queue_lck()
92 state->request_qtail->host_scribble = (void *) cmd; in mac53c94_queue_lck()
93 state->request_qtail = cmd; in mac53c94_queue_lck()
103 static int mac53c94_host_reset(struct scsi_cmnd *cmd) in DEF_SCSI_QCMD()
105 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata; in DEF_SCSI_QCMD()
110 spin_lock_irqsave(cmd->device->host->host_lock, flags); in DEF_SCSI_QCMD()
120 spin_unlock_irqrestore(cmd->device->host->host_lock, flags); in DEF_SCSI_QCMD()
146 struct scsi_cmnd *cmd; in mac53c94_start() local
154 state->current_req = cmd = state->request_q; in mac53c94_start()
155 state->request_q = (struct scsi_cmnd *) cmd->host_scribble; in mac53c94_start()
165 writeb(cmd->device->id, &regs->dest_id); in mac53c94_start()
170 for (i = 0; i < cmd->cmd_len; ++i) in mac53c94_start()
171 writeb(cmd->cmnd[i], &regs->fifo); in mac53c94_start()
177 set_dma_cmds(state, cmd); in mac53c94_start()
196 struct scsi_cmnd *const cmd = state->current_req; in mac53c94_interrupt() local
197 struct mac53c94_cmd_priv *const mcmd = mac53c94_priv(cmd); in mac53c94_interrupt()
237 if (!cmd) { in mac53c94_interrupt()
266 && (scsi_sg_count(cmd) > 0 || scsi_bufflen(cmd))) { in mac53c94_interrupt()
314 scsi_dma_unmap(cmd); in mac53c94_interrupt()
343 struct scsi_cmnd *cmd; in cmd_done() local
345 cmd = state->current_req; in cmd_done()
346 if (cmd) { in cmd_done()
347 cmd->result = result; in cmd_done()
348 scsi_done(cmd); in cmd_done()
358 static void set_dma_cmds(struct fsc_state *state, struct scsi_cmnd *cmd) in set_dma_cmds() argument
366 nseg = scsi_dma_map(cmd); in set_dma_cmds()
371 dma_cmd = cmd->sc_data_direction == DMA_TO_DEVICE ? in set_dma_cmds()
376 scsi_for_each_sg(cmd, scl, nseg, i) { in set_dma_cmds()
392 mac53c94_priv(cmd)->this_residual = total; in set_dma_cmds()