Lines Matching refs:scmd
176 struct scsi_cmnd *scmd);
197 struct scsi_cmnd *scmd);
258 cmd->scmd = NULL; in megasas_return_cmd()
1542 if (!cmd->scmd) in megasas_dump_pending_frames()
1545 if (megasas_cmd_type(cmd->scmd) == READ_WRITE_LDIO) { in megasas_dump_pending_frames()
1590 struct scsi_cmnd *scmd) in megasas_build_and_issue_cmd() argument
1602 if (megasas_cmd_type(scmd) == READ_WRITE_LDIO) in megasas_build_and_issue_cmd()
1603 frame_count = megasas_build_ldio(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1605 frame_count = megasas_build_dcdb(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1610 cmd->scmd = scmd; in megasas_build_and_issue_cmd()
1611 scmd->SCp.ptr = (char *)cmd; in megasas_build_and_issue_cmd()
1634 megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) in megasas_queue_command() argument
1640 scmd->device->host->hostdata; in megasas_queue_command()
1643 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1644 scmd->scsi_done(scmd); in megasas_queue_command()
1655 if (megasas_check_mpio_paths(instance, scmd) == in megasas_queue_command()
1661 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1662 scmd->scsi_done(scmd); in megasas_queue_command()
1669 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1670 scmd->scsi_done(scmd); in megasas_queue_command()
1681 scmd->result = 0; in megasas_queue_command()
1683 if (MEGASAS_IS_LOGICAL(scmd) && in megasas_queue_command()
1684 (scmd->device->id >= instance->fw_supported_vd_count || in megasas_queue_command()
1685 scmd->device->lun)) { in megasas_queue_command()
1686 scmd->result = DID_BAD_TARGET << 16; in megasas_queue_command()
1690 switch (scmd->cmnd[0]) { in megasas_queue_command()
1696 scmd->result = DID_OK << 16; in megasas_queue_command()
1702 if (instance->instancet->build_and_issue_cmd(instance, scmd)) { in megasas_queue_command()
1710 scmd->scsi_done(scmd); in megasas_queue_command()
2421 if (reset_cmd->scmd) { in megasas_wait_for_outstanding()
2422 reset_cmd->scmd->result = DID_RESET << 16; in megasas_wait_for_outstanding()
2425 reset_cmd->scmd->cmnd[0]); in megasas_wait_for_outstanding()
2427 reset_cmd->scmd->scsi_done(reset_cmd->scmd); in megasas_wait_for_outstanding()
2540 static int megasas_generic_reset(struct scsi_cmnd *scmd) in megasas_generic_reset() argument
2545 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_generic_reset()
2547 scmd_printk(KERN_NOTICE, scmd, "megasas: RESET cmd=%x retries=%x\n", in megasas_generic_reset()
2548 scmd->cmnd[0], scmd->retries); in megasas_generic_reset()
2572 blk_eh_timer_return megasas_reset_timer(struct scsi_cmnd *scmd) in megasas_reset_timer() argument
2577 if (time_after(jiffies, scmd->jiffies_at_alloc + in megasas_reset_timer()
2582 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_timer()
2599 static int megasas_reset_device(struct scsi_cmnd *scmd) in megasas_reset_device() argument
2604 return megasas_generic_reset(scmd); in megasas_reset_device()
2610 static int megasas_reset_bus_host(struct scsi_cmnd *scmd) in megasas_reset_bus_host() argument
2615 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_bus_host()
2621 ret = megasas_reset_fusion(scmd->device->host, 1); in megasas_reset_bus_host()
2623 ret = megasas_generic_reset(scmd); in megasas_reset_bus_host()
2953 if (cmd->scmd) in megasas_complete_cmd()
2954 cmd->scmd->SCp.ptr = NULL; in megasas_complete_cmd()
2985 cmd->scmd->result = alt_status << 16; in megasas_complete_cmd()
2993 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
2994 cmd->scmd->scsi_done(cmd->scmd); in megasas_complete_cmd()
3003 cmd->scmd->result = DID_OK << 16; in megasas_complete_cmd()
3008 cmd->scmd->result = in megasas_complete_cmd()
3014 cmd->scmd->result = (DID_OK << 16) | hdr->scsi_status; in megasas_complete_cmd()
3017 memset(cmd->scmd->sense_buffer, 0, in megasas_complete_cmd()
3019 memcpy(cmd->scmd->sense_buffer, cmd->sense, in megasas_complete_cmd()
3022 cmd->scmd->result |= DRIVER_SENSE << 24; in megasas_complete_cmd()
3029 cmd->scmd->result = DID_BAD_TARGET << 16; in megasas_complete_cmd()
3035 cmd->scmd->result = DID_ERROR << 16; in megasas_complete_cmd()
3041 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
3042 cmd->scmd->scsi_done(cmd->scmd); in megasas_complete_cmd()
3163 if (cmd->sync_cmd || cmd->scmd) { in megasas_issue_pending_cmds_again()
3166 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3174 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3183 if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3194 } else if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3197 cmd, cmd->scmd->cmnd[0]); in megasas_issue_pending_cmds_again()
3250 if (cmd->sync_cmd == 1 || cmd->scmd) { in megasas_internal_reset_defer_cmds()
3253 defer_index, cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3259 cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3837 cmd->scmd = NULL; in megasas_alloc_cmds()