Lines Matching refs:scmd

1534 static int myrs_host_reset(struct scsi_cmnd *scmd)  in myrs_host_reset()  argument
1536 struct Scsi_Host *shost = scmd->device->host; in myrs_host_reset()
1543 static void myrs_mode_sense(struct myrs_hba *cs, struct scsi_cmnd *scmd, in myrs_mode_sense() argument
1550 dbd = (scmd->cmnd[1] & 0x08) == 0x08; in myrs_mode_sense()
1583 scsi_sg_copy_from_buffer(scmd, modes, mode_len); in myrs_mode_sense()
1587 struct scsi_cmnd *scmd) in myrs_queuecommand() argument
1589 struct request *rq = scsi_cmd_to_rq(scmd); in myrs_queuecommand()
1591 struct myrs_cmdblk *cmd_blk = scsi_cmd_priv(scmd); in myrs_queuecommand()
1593 struct scsi_device *sdev = scmd->device; in myrs_queuecommand()
1600 if (!scmd->device->hostdata) { in myrs_queuecommand()
1601 scmd->result = (DID_NO_CONNECT << 16); in myrs_queuecommand()
1602 scsi_done(scmd); in myrs_queuecommand()
1606 switch (scmd->cmnd[0]) { in myrs_queuecommand()
1608 scsi_build_sense(scmd, 0, ILLEGAL_REQUEST, 0x20, 0x0); in myrs_queuecommand()
1609 scsi_done(scmd); in myrs_queuecommand()
1612 if (scmd->device->channel >= cs->ctlr_info->physchan_present) { in myrs_queuecommand()
1615 if ((scmd->cmnd[2] & 0x3F) != 0x3F && in myrs_queuecommand()
1616 (scmd->cmnd[2] & 0x3F) != 0x08) { in myrs_queuecommand()
1618 scsi_build_sense(scmd, 0, ILLEGAL_REQUEST, 0x24, 0); in myrs_queuecommand()
1620 myrs_mode_sense(cs, scmd, ldev_info); in myrs_queuecommand()
1621 scmd->result = (DID_OK << 16); in myrs_queuecommand()
1623 scsi_done(scmd); in myrs_queuecommand()
1637 if (scmd->cmd_len <= 10) { in myrs_queuecommand()
1638 if (scmd->device->channel >= cs->ctlr_info->physchan_present) { in myrs_queuecommand()
1654 (scmd->sc_data_direction == DMA_FROM_DEVICE); in myrs_queuecommand()
1657 mbox->SCSI_10.dma_size = scsi_bufflen(scmd); in myrs_queuecommand()
1660 mbox->SCSI_10.cdb_len = scmd->cmd_len; in myrs_queuecommand()
1668 memcpy(&mbox->SCSI_10.cdb, scmd->cmnd, scmd->cmd_len); in myrs_queuecommand()
1684 if (scmd->device->channel >= cs->ctlr_info->physchan_present) { in myrs_queuecommand()
1700 (scmd->sc_data_direction == DMA_FROM_DEVICE); in myrs_queuecommand()
1703 mbox->SCSI_255.dma_size = scsi_bufflen(scmd); in myrs_queuecommand()
1706 mbox->SCSI_255.cdb_len = scmd->cmd_len; in myrs_queuecommand()
1715 memcpy(cmd_blk->dcdb, scmd->cmnd, scmd->cmd_len); in myrs_queuecommand()
1718 if (scmd->sc_data_direction == DMA_NONE) in myrs_queuecommand()
1720 nsge = scsi_dma_map(scmd); in myrs_queuecommand()
1722 sgl = scsi_sglist(scmd); in myrs_queuecommand()
1750 if (scmd->cmd_len <= 10) in myrs_queuecommand()
1759 scsi_for_each_sg(scmd, sgl, nsge, i) { in myrs_queuecommand()
1761 scsi_dma_unmap(scmd); in myrs_queuecommand()
1762 scmd->result = (DID_ERROR << 16); in myrs_queuecommand()
1763 scsi_done(scmd); in myrs_queuecommand()
2049 struct scsi_cmnd *scmd) in myrs_handle_scsi() argument
2056 scsi_dma_unmap(scmd); in myrs_handle_scsi()
2064 memcpy(scmd->sense_buffer, cmd_blk->sense, sense_len); in myrs_handle_scsi()
2084 scsi_set_resid(scmd, cmd_blk->residual); in myrs_handle_scsi()
2087 scmd->result = (DID_BAD_TARGET << 16); in myrs_handle_scsi()
2089 scmd->result = (DID_OK << 16) | status; in myrs_handle_scsi()
2090 scsi_done(scmd); in myrs_handle_scsi()
2586 struct scsi_cmnd *scmd = NULL; in DAC960_GEM_intr_handler() local
2594 scmd = scsi_host_find_tag(cs->host, id - 3); in DAC960_GEM_intr_handler()
2595 if (scmd) in DAC960_GEM_intr_handler()
2596 cmd_blk = scsi_cmd_priv(scmd); in DAC960_GEM_intr_handler()
2614 myrs_handle_scsi(cs, cmd_blk, scmd); in DAC960_GEM_intr_handler()
2805 struct scsi_cmnd *scmd = NULL; in DAC960_BA_intr_handler() local
2813 scmd = scsi_host_find_tag(cs->host, id - 3); in DAC960_BA_intr_handler()
2814 if (scmd) in DAC960_BA_intr_handler()
2815 cmd_blk = scsi_cmd_priv(scmd); in DAC960_BA_intr_handler()
2833 myrs_handle_scsi(cs, cmd_blk, scmd); in DAC960_BA_intr_handler()
3024 struct scsi_cmnd *scmd = NULL; in DAC960_LP_intr_handler() local
3032 scmd = scsi_host_find_tag(cs->host, id - 3); in DAC960_LP_intr_handler()
3033 if (scmd) in DAC960_LP_intr_handler()
3034 cmd_blk = scsi_cmd_priv(scmd); in DAC960_LP_intr_handler()
3052 myrs_handle_scsi(cs, cmd_blk, scmd); in DAC960_LP_intr_handler()