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 megasas_priv(scmd)->cmd_priv = 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()
2787 if (reset_cmd->scmd) { in megasas_wait_for_outstanding()
2788 reset_cmd->scmd->result = DID_REQUEUE << 16; in megasas_wait_for_outstanding()
2791 reset_cmd->scmd->cmnd[0]); in megasas_wait_for_outstanding()
2793 scsi_done(reset_cmd->scmd); in megasas_wait_for_outstanding()
2899 static int megasas_generic_reset(struct scsi_cmnd *scmd) in megasas_generic_reset() argument
2904 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_generic_reset()
2906 scmd_printk(KERN_NOTICE, scmd, "megasas: RESET cmd=%x retries=%x\n", in megasas_generic_reset()
2907 scmd->cmnd[0], scmd->retries); in megasas_generic_reset()
2930 static enum scsi_timeout_action megasas_reset_timer(struct scsi_cmnd *scmd) in megasas_reset_timer() argument
2935 if (time_after(jiffies, scmd->jiffies_at_alloc + in megasas_reset_timer()
2940 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_timer()
2999 megasas_dump_fusion_io(struct scsi_cmnd *scmd) in megasas_dump_fusion_io() argument
3001 struct megasas_cmd_fusion *cmd = megasas_priv(scmd)->cmd_priv; in megasas_dump_fusion_io()
3005 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_dump_fusion_io()
3007 scmd_printk(KERN_INFO, scmd, in megasas_dump_fusion_io()
3009 scmd, scmd->retries, scmd->allowed); in megasas_dump_fusion_io()
3010 scsi_print_command(scmd); in megasas_dump_fusion_io()
3014 scmd_printk(KERN_INFO, scmd, "Request descriptor details:\n"); in megasas_dump_fusion_io()
3015 scmd_printk(KERN_INFO, scmd, in megasas_dump_fusion_io()
3059 static int megasas_reset_bus_host(struct scsi_cmnd *scmd) in megasas_reset_bus_host() argument
3064 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_bus_host()
3066 scmd_printk(KERN_INFO, scmd, in megasas_reset_bus_host()
3069 scmd_printk(KERN_INFO, scmd, in megasas_reset_bus_host()
3071 scmd->device->host->shost_state, in megasas_reset_bus_host()
3072 scsi_host_busy(scmd->device->host), in megasas_reset_bus_host()
3078 ret = megasas_generic_reset(scmd); in megasas_reset_bus_host()
3080 megasas_dump_fusion_io(scmd); in megasas_reset_bus_host()
3081 ret = megasas_reset_fusion(scmd->device->host, in megasas_reset_bus_host()
3093 static int megasas_task_abort(struct scsi_cmnd *scmd) in megasas_task_abort() argument
3098 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_task_abort()
3101 ret = megasas_task_abort_fusion(scmd); in megasas_task_abort()
3103 sdev_printk(KERN_NOTICE, scmd->device, "TASK ABORT not supported\n"); in megasas_task_abort()
3115 static int megasas_reset_target(struct scsi_cmnd *scmd) in megasas_reset_target() argument
3120 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_target()
3123 ret = megasas_reset_target_fusion(scmd); in megasas_reset_target()
3125 sdev_printk(KERN_NOTICE, scmd->device, "TARGET RESET not supported\n"); in megasas_reset_target()
3610 if (cmd->scmd) in megasas_complete_cmd()
3611 megasas_priv(cmd->scmd)->cmd_priv = NULL; in megasas_complete_cmd()
3643 cmd->scmd->result = alt_status << 16; in megasas_complete_cmd()
3651 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
3652 scsi_done(cmd->scmd); in megasas_complete_cmd()
3661 cmd->scmd->result = DID_OK << 16; in megasas_complete_cmd()
3666 cmd->scmd->result = in megasas_complete_cmd()
3672 cmd->scmd->result = (DID_OK << 16) | hdr->scsi_status; in megasas_complete_cmd()
3675 memset(cmd->scmd->sense_buffer, 0, in megasas_complete_cmd()
3677 memcpy(cmd->scmd->sense_buffer, cmd->sense, in megasas_complete_cmd()
3685 cmd->scmd->result = DID_BAD_TARGET << 16; in megasas_complete_cmd()
3691 cmd->scmd->result = DID_ERROR << 16; in megasas_complete_cmd()
3697 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
3698 scsi_done(cmd->scmd); in megasas_complete_cmd()
3833 if (cmd->sync_cmd || cmd->scmd) { in megasas_issue_pending_cmds_again()
3836 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3844 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3853 if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3864 } else if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3867 cmd, cmd->scmd->cmnd[0]); in megasas_issue_pending_cmds_again()
3920 if (cmd->sync_cmd == 1 || cmd->scmd) { in megasas_internal_reset_defer_cmds()
3923 defer_index, cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3929 cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
4494 cmd->scmd = NULL; in megasas_alloc_cmds()