Lines Matching refs:scsi_cmd
209 #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \
210 DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \
212 scb->scsi_cmd->sc_data_direction)
800 while ((item) && (item->scsi_cmd != SC)) in ips_eh_abort()
865 while ((item) && (item->scsi_cmd != SC)) in __ips_eh_reset()
928 struct scsi_cmnd *scsi_cmd; in __ips_eh_reset() local
938 scb->scsi_cmd->result = DID_ERROR << 16; in __ips_eh_reset()
939 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in __ips_eh_reset()
947 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
948 scsi_cmd->result = DID_ERROR; in __ips_eh_reset()
949 scsi_cmd->scsi_done(scsi_cmd); in __ips_eh_reset()
957 struct scsi_cmnd *scsi_cmd; in __ips_eh_reset() local
967 scb->scsi_cmd->result = DID_ERROR << 16; in __ips_eh_reset()
968 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in __ips_eh_reset()
976 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
977 scsi_cmd->result = DID_ERROR << 16; in __ips_eh_reset()
978 scsi_cmd->scsi_done(scsi_cmd); in __ips_eh_reset()
996 scb->scsi_cmd->result = DID_RESET << 16; in __ips_eh_reset()
997 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in __ips_eh_reset()
1116 scratch->scsi_cmd = SC; in ips_queue_lck()
1670 scb->scsi_cmd->result = DID_OK << 16; in ips_flash_copperhead()
1853 scb->bus = scb->scsi_cmd->device->channel; in ips_flash_firmware()
1854 scb->target_id = scb->scsi_cmd->device->id; in ips_flash_firmware()
1855 scb->lun = scb->scsi_cmd->device->lun; in ips_flash_firmware()
1872 scb->scsi_cmd->result = DID_OK << 16; in ips_flash_firmware()
1922 scb->bus = scb->scsi_cmd->device->channel; in ips_usrcmd()
1923 scb->target_id = scb->scsi_cmd->device->id; in ips_usrcmd()
1924 scb->lun = scb->scsi_cmd->device->lun; in ips_usrcmd()
1974 scb->scsi_cmd->result = DID_OK << 16; in ips_usrcmd()
1996 if ((!scb) || (!scb->scsi_cmd) || (!scsi_sglist(scb->scsi_cmd))) { in ips_cleanup_passthru()
2017 ips_scmd_buf_write(scb->scsi_cmd, ha->ioctl_data, ha->ioctl_datasize); in ips_cleanup_passthru()
2571 scb->scsi_cmd = item->scsi_cmd; in ips_next()
2574 ret = ips_make_passthru(ha, scb->scsi_cmd, scb, intr); in ips_next()
2580 if (scb->scsi_cmd) { in ips_next()
2581 scb->scsi_cmd->result = DID_ERROR << 16; in ips_next()
2582 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_next()
2588 if (scb->scsi_cmd) { in ips_next()
2589 scb->scsi_cmd->result = DID_OK << 16; in ips_next()
2590 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_next()
2613 if (scb->scsi_cmd) { in ips_next()
2614 scb->scsi_cmd->result = DID_ERROR << 16; in ips_next()
2655 scb->scsi_cmd = SC; in ips_next()
2688 ips_command_direction[scb->scsi_cmd->cmnd[0]]; in ips_next()
2692 if ((scb->scsi_cmd->cmnd[0] == WRITE_BUFFER) && in ips_next()
2713 if (scb->scsi_cmd) { in ips_next()
2714 scb->scsi_cmd->result = DID_ERROR << 16; in ips_next()
2715 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_next()
2725 if (scb->scsi_cmd) in ips_next()
2726 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_next()
3122 if (scb->scsi_cmd == NULL) { in ipsintr_done()
3152 if ((scb->scsi_cmd) && (ips_is_passthru(scb->scsi_cmd))) { in ips_done()
3168 sg = scsi_sglist(scb->scsi_cmd); in ips_done()
3181 for (; sg_dma_index < scsi_sg_count(scb->scsi_cmd); in ips_done()
3193 ips_command_direction[scb->scsi_cmd->cmnd[0]]; in ips_done()
3207 if (scb->scsi_cmd) { in ips_done()
3208 scb->scsi_cmd->result = DID_ERROR << 16; in ips_done()
3209 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_done()
3215 if (scb->scsi_cmd) { in ips_done()
3216 scb->scsi_cmd->result = DID_ERROR << 16; in ips_done()
3217 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_done()
3234 scb->scsi_cmd->scsi_done(scb->scsi_cmd); in ips_done()
3263 scb->scsi_cmd->device->channel, in ips_map_status()
3264 scb->scsi_cmd->device->id, scb->scsi_cmd->device->lun, in ips_map_status()
3314 if (scb->scsi_cmd->cmnd[0] == INQUIRY) { in ips_map_status()
3315 ips_scmd_buf_read(scb->scsi_cmd, in ips_map_status()
3347 memcpy_and_pad(scb->scsi_cmd->sense_buffer, in ips_map_status()
3352 memcpy_and_pad(scb->scsi_cmd->sense_buffer, in ips_map_status()
3371 scb->scsi_cmd->result = device_error | (errcode << 16); in ips_map_status()
3466 if (!scb->scsi_cmd) { in ips_send_cmd()
3479 } else if ((scb->bus == 0) && (!ips_is_passthru(scb->scsi_cmd))) { in ips_send_cmd()
3483 switch (scb->scsi_cmd->cmnd[0]) { in ips_send_cmd()
3489 scb->scsi_cmd->result = DID_ERROR << 16; in ips_send_cmd()
3493 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3503 if (scb->scsi_cmd->cmnd[0] == TEST_UNIT_READY) in ips_send_cmd()
3504 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3506 if (scb->scsi_cmd->cmnd[0] == INQUIRY) { in ips_send_cmd()
3532 ips_scmd_buf_write(scb->scsi_cmd, in ips_send_cmd()
3536 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3554 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3561 (scb->scsi_cmd->cmnd[0] == in ips_send_cmd()
3568 (scb->scsi_cmd->cmnd[0] == in ips_send_cmd()
3588 (((scb->scsi_cmd-> in ips_send_cmd()
3589 cmnd[1] & 0x1f) << 16) | (scb->scsi_cmd-> in ips_send_cmd()
3591 (scb->scsi_cmd->cmnd[3])); in ips_send_cmd()
3607 (scb->scsi_cmd->cmnd[0] == in ips_send_cmd()
3614 (scb->scsi_cmd->cmnd[0] == in ips_send_cmd()
3634 ((scb->scsi_cmd->cmnd[2] << 24) | (scb-> in ips_send_cmd()
3635 scsi_cmd-> in ips_send_cmd()
3638 (scb->scsi_cmd->cmnd[4] << 8) | scb-> in ips_send_cmd()
3639 scsi_cmd->cmnd[5]); in ips_send_cmd()
3650 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3658 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3692 scb->scsi_cmd->result = DID_OK << 16; in ips_send_cmd()
3699 sp = (char *) scb->scsi_cmd->sense_buffer; in ips_send_cmd()
3708 scb->scsi_cmd->result = device_error | (DID_OK << 16); in ips_send_cmd()
3722 scb->scsi_cmd->result = DID_NO_CONNECT << 16; in ips_send_cmd()
3738 TimeOut = scsi_cmd_to_rq(scb->scsi_cmd)->timeout; in ips_send_cmd()
3765 tapeDCDB->cdb_length = scb->scsi_cmd->cmd_len; in ips_send_cmd()
3778 memcpy(tapeDCDB->scsi_cdb, scb->scsi_cmd->cmnd, in ips_send_cmd()
3779 scb->scsi_cmd->cmd_len); in ips_send_cmd()
3811 scb->dcdb.cdb_length = scb->scsi_cmd->cmd_len; in ips_send_cmd()
3815 memcpy(scb->dcdb.scsi_cdb, scb->scsi_cmd->cmnd, in ips_send_cmd()
3816 scb->scsi_cmd->cmd_len); in ips_send_cmd()
3860 if (!scb->scsi_cmd) in ips_chkstatus()
3871 if ((scb->scsi_cmd) && (ips_is_passthru(scb->scsi_cmd))) in ips_chkstatus()
3890 switch (scb->scsi_cmd->cmnd[0]) { in ips_chkstatus()
3962 scb->scsi_cmd->result = errcode << 16; in ips_chkstatus()
3965 if (scb->scsi_cmd->cmnd[0] == INQUIRY) { in ips_chkstatus()
3966 ips_scmd_buf_read(scb->scsi_cmd, in ips_chkstatus()
3969 scb->scsi_cmd->result = DID_TIME_OUT << 16; in ips_chkstatus()
4050 ips_scmd_buf_write(scb->scsi_cmd, &inquiry, sizeof (inquiry)); in ips_inquiry()
4071 if (scsi_bufflen(scb->scsi_cmd) < 8) in ips_rdcap()
4080 ips_scmd_buf_write(scb->scsi_cmd, &cap, sizeof (cap)); in ips_rdcap()
4121 switch (scb->scsi_cmd->cmnd[2] & 0x3f) { in ips_msense()
4171 ips_scmd_buf_write(scb->scsi_cmd, &mdata, sizeof (mdata)); in ips_msense()
4200 ips_scmd_buf_write(scb->scsi_cmd, &reqsen, sizeof (reqsen)); in ips_reqsen()
4453 scsi_dma_unmap(scb->scsi_cmd); in ips_freescb()
5284 if (scb->scsi_cmd) { in ips_issue_copperhead()
5338 if (scb->scsi_cmd) { in ips_issue_copperhead_memio()
5389 if (scb->scsi_cmd) { in ips_issue_i2o()
5421 if (scb->scsi_cmd) { in ips_issue_i2o_memio()