Lines Matching refs:cmd

259 static void aha1542_free_cmd(struct scsi_cmnd *cmd)  in aha1542_free_cmd()  argument
261 struct aha1542_cmd *acmd = scsi_cmd_priv(cmd); in aha1542_free_cmd()
263 if (cmd->sc_data_direction == DMA_FROM_DEVICE) { in aha1542_free_cmd()
264 struct request *rq = scsi_cmd_to_rq(cmd); in aha1542_free_cmd()
275 scsi_dma_unmap(cmd); in aha1542_free_cmd()
414 static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd) in aha1542_queuecommand() argument
416 struct aha1542_cmd *acmd = scsi_cmd_priv(cmd); in aha1542_queuecommand()
419 u8 target = cmd->device->id; in aha1542_queuecommand()
420 u8 lun = cmd->device->lun; in aha1542_queuecommand()
422 int bufflen = scsi_bufflen(cmd); in aha1542_queuecommand()
427 if (*cmd->cmnd == REQUEST_SENSE) { in aha1542_queuecommand()
429 cmd->result = 0; in aha1542_queuecommand()
430 scsi_done(cmd); in aha1542_queuecommand()
436 if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10) in aha1542_queuecommand()
437 i = xscsi2int(cmd->cmnd + 2); in aha1542_queuecommand()
438 else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6) in aha1542_queuecommand()
439 i = scsi2int(cmd->cmnd + 2); in aha1542_queuecommand()
441 target, *cmd->cmnd, i, bufflen); in aha1542_queuecommand()
442 print_hex_dump_bytes("command: ", DUMP_PREFIX_NONE, cmd->cmnd, cmd->cmd_len); in aha1542_queuecommand()
446 if (cmd->sc_data_direction == DMA_TO_DEVICE) { in aha1542_queuecommand()
447 struct request *rq = scsi_cmd_to_rq(cmd); in aha1542_queuecommand()
479 aha1542->int_cmds[mbo] = cmd; /* This will effectively prevent someone else from in aha1542_queuecommand()
494 ccb[mbo].cdblen = cmd->cmd_len; in aha1542_queuecommand()
497 if (*cmd->cmnd == READ_10 || *cmd->cmnd == READ_6) in aha1542_queuecommand()
499 else if (*cmd->cmnd == WRITE_10 || *cmd->cmnd == WRITE_6) in aha1542_queuecommand()
502 memcpy(ccb[mbo].cdb, cmd->cmnd, ccb[mbo].cdblen); in aha1542_queuecommand()
519 aha1542_outb(cmd->device->host->io_port, CMD_START_SCSI); in aha1542_queuecommand()
864 static int aha1542_dev_reset(struct scsi_cmnd *cmd) in aha1542_dev_reset() argument
866 struct Scsi_Host *sh = cmd->device->host; in aha1542_dev_reset()
870 u8 target = cmd->device->id; in aha1542_dev_reset()
871 u8 lun = cmd->device->lun; in aha1542_dev_reset()
891 aha1542->int_cmds[mbo] = cmd; /* This will effectively in aha1542_dev_reset()
917 scmd_printk(KERN_WARNING, cmd, in aha1542_dev_reset()
923 static int aha1542_reset(struct scsi_cmnd *cmd, u8 reset_cmd) in aha1542_reset() argument
925 struct Scsi_Host *sh = cmd->device->host; in aha1542_reset()
937 outb(reset_cmd, CONTROL(cmd->device->host->io_port)); in aha1542_reset()
939 if (!wait_mask(STATUS(cmd->device->host->io_port), in aha1542_reset()
950 setup_mailboxes(cmd->device->host); in aha1542_reset()
958 …shost_printk(KERN_WARNING, cmd->device->host, "Sent BUS RESET to scsi host %d\n", cmd->device->hos… in aha1542_reset()
984 static int aha1542_bus_reset(struct scsi_cmnd *cmd) in aha1542_bus_reset() argument
986 return aha1542_reset(cmd, SCRST); in aha1542_bus_reset()
989 static int aha1542_host_reset(struct scsi_cmnd *cmd) in aha1542_host_reset() argument
991 return aha1542_reset(cmd, HRST | SCRST); in aha1542_host_reset()
1014 static int aha1542_init_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd) in aha1542_init_cmd_priv() argument
1016 struct aha1542_cmd *acmd = scsi_cmd_priv(cmd); in aha1542_init_cmd_priv()
1026 static int aha1542_exit_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd) in aha1542_exit_cmd_priv() argument
1028 struct aha1542_cmd *acmd = scsi_cmd_priv(cmd); in aha1542_exit_cmd_priv()