Lines Matching refs:scmd

236 			    struct scsi_cmnd *scmd);
364 cmd->scmd = NULL; in megasas_return_cmd()
1694 if (!cmd->scmd) in megasas_dump_pending_frames()
1697 if (megasas_cmd_type(cmd->scmd) == READ_WRITE_LDIO) { in megasas_dump_pending_frames()
1742 struct scsi_cmnd *scmd) in megasas_build_and_issue_cmd() argument
1754 if (megasas_cmd_type(scmd) == READ_WRITE_LDIO) in megasas_build_and_issue_cmd()
1755 frame_count = megasas_build_ldio(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1757 frame_count = megasas_build_dcdb(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1762 cmd->scmd = scmd; in megasas_build_and_issue_cmd()
1763 scmd->SCp.ptr = (char *)cmd; in megasas_build_and_issue_cmd()
1786 megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) in megasas_queue_command() argument
1793 scmd->device->host->hostdata; in megasas_queue_command()
1796 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1797 scsi_done(scmd); in megasas_queue_command()
1807 if (megasas_check_mpio_paths(instance, scmd) == in megasas_queue_command()
1811 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1812 scsi_done(scmd); in megasas_queue_command()
1817 mr_device_priv_data = scmd->device->hostdata; in megasas_queue_command()
1820 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1821 scsi_done(scmd); in megasas_queue_command()
1825 if (MEGASAS_IS_LOGICAL(scmd->device)) { in megasas_queue_command()
1826 ld_tgt_id = MEGASAS_TARGET_ID(scmd->device); in megasas_queue_command()
1828 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1829 scsi_done(scmd); in megasas_queue_command()
1841 scmd->result = 0; in megasas_queue_command()
1843 if (MEGASAS_IS_LOGICAL(scmd->device) && in megasas_queue_command()
1844 (scmd->device->id >= instance->fw_supported_vd_count || in megasas_queue_command()
1845 scmd->device->lun)) { in megasas_queue_command()
1846 scmd->result = DID_BAD_TARGET << 16; in megasas_queue_command()
1850 if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && in megasas_queue_command()
1851 MEGASAS_IS_LOGICAL(scmd->device) && in megasas_queue_command()
1853 scmd->result = DID_OK << 16; in megasas_queue_command()
1857 return instance->instancet->build_and_issue_cmd(instance, scmd); in megasas_queue_command()
1860 scsi_done(scmd); in megasas_queue_command()
2780 if (reset_cmd->scmd) { in megasas_wait_for_outstanding()
2781 reset_cmd->scmd->result = DID_REQUEUE << 16; in megasas_wait_for_outstanding()
2784 reset_cmd->scmd->cmnd[0]); in megasas_wait_for_outstanding()
2786 scsi_done(reset_cmd->scmd); in megasas_wait_for_outstanding()
2892 static int megasas_generic_reset(struct scsi_cmnd *scmd) in megasas_generic_reset() argument
2897 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_generic_reset()
2899 scmd_printk(KERN_NOTICE, scmd, "megasas: RESET cmd=%x retries=%x\n", in megasas_generic_reset()
2900 scmd->cmnd[0], scmd->retries); in megasas_generic_reset()
2924 blk_eh_timer_return megasas_reset_timer(struct scsi_cmnd *scmd) in megasas_reset_timer() argument
2929 if (time_after(jiffies, scmd->jiffies_at_alloc + in megasas_reset_timer()
2934 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_timer()
2993 megasas_dump_fusion_io(struct scsi_cmnd *scmd) in megasas_dump_fusion_io() argument
2999 cmd = (struct megasas_cmd_fusion *)scmd->SCp.ptr; in megasas_dump_fusion_io()
3000 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_dump_fusion_io()
3002 scmd_printk(KERN_INFO, scmd, in megasas_dump_fusion_io()
3004 scmd, scmd->retries, scmd->allowed); in megasas_dump_fusion_io()
3005 scsi_print_command(scmd); in megasas_dump_fusion_io()
3009 scmd_printk(KERN_INFO, scmd, "Request descriptor details:\n"); in megasas_dump_fusion_io()
3010 scmd_printk(KERN_INFO, scmd, in megasas_dump_fusion_io()
3054 static int megasas_reset_bus_host(struct scsi_cmnd *scmd) in megasas_reset_bus_host() argument
3059 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_bus_host()
3061 scmd_printk(KERN_INFO, scmd, in megasas_reset_bus_host()
3064 scmd_printk(KERN_INFO, scmd, in megasas_reset_bus_host()
3066 scmd->device->host->shost_state, in megasas_reset_bus_host()
3067 scsi_host_busy(scmd->device->host), in megasas_reset_bus_host()
3073 ret = megasas_generic_reset(scmd); in megasas_reset_bus_host()
3075 megasas_dump_fusion_io(scmd); in megasas_reset_bus_host()
3076 ret = megasas_reset_fusion(scmd->device->host, in megasas_reset_bus_host()
3088 static int megasas_task_abort(struct scsi_cmnd *scmd) in megasas_task_abort() argument
3093 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_task_abort()
3096 ret = megasas_task_abort_fusion(scmd); in megasas_task_abort()
3098 sdev_printk(KERN_NOTICE, scmd->device, "TASK ABORT not supported\n"); in megasas_task_abort()
3110 static int megasas_reset_target(struct scsi_cmnd *scmd) in megasas_reset_target() argument
3115 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_target()
3118 ret = megasas_reset_target_fusion(scmd); in megasas_reset_target()
3120 sdev_printk(KERN_NOTICE, scmd->device, "TARGET RESET not supported\n"); in megasas_reset_target()
3603 if (cmd->scmd) in megasas_complete_cmd()
3604 cmd->scmd->SCp.ptr = NULL; in megasas_complete_cmd()
3636 cmd->scmd->result = alt_status << 16; in megasas_complete_cmd()
3644 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
3645 scsi_done(cmd->scmd); in megasas_complete_cmd()
3654 cmd->scmd->result = DID_OK << 16; in megasas_complete_cmd()
3659 cmd->scmd->result = in megasas_complete_cmd()
3665 cmd->scmd->result = (DID_OK << 16) | hdr->scsi_status; in megasas_complete_cmd()
3668 memset(cmd->scmd->sense_buffer, 0, in megasas_complete_cmd()
3670 memcpy(cmd->scmd->sense_buffer, cmd->sense, in megasas_complete_cmd()
3678 cmd->scmd->result = DID_BAD_TARGET << 16; in megasas_complete_cmd()
3684 cmd->scmd->result = DID_ERROR << 16; in megasas_complete_cmd()
3690 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
3691 scsi_done(cmd->scmd); in megasas_complete_cmd()
3826 if (cmd->sync_cmd || cmd->scmd) { in megasas_issue_pending_cmds_again()
3829 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3837 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3846 if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3857 } else if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3860 cmd, cmd->scmd->cmnd[0]); in megasas_issue_pending_cmds_again()
3913 if (cmd->sync_cmd == 1 || cmd->scmd) { in megasas_internal_reset_defer_cmds()
3916 defer_index, cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3922 cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
4491 cmd->scmd = NULL; in megasas_alloc_cmds()