Lines Matching refs:scmd

170 			    struct scsi_cmnd *scmd);
191 struct scsi_cmnd *scmd);
244 cmd->scmd = NULL; in __megasas_return_cmd()
1474 if(!cmd->scmd) in megasas_dump_pending_frames()
1477 if (megasas_cmd_type(cmd->scmd) == READ_WRITE_LDIO) { in megasas_dump_pending_frames()
1525 struct scsi_cmnd *scmd) in megasas_build_and_issue_cmd() argument
1537 if (megasas_cmd_type(scmd) == READ_WRITE_LDIO) in megasas_build_and_issue_cmd()
1538 frame_count = megasas_build_ldio(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1540 frame_count = megasas_build_dcdb(instance, scmd, cmd); in megasas_build_and_issue_cmd()
1545 cmd->scmd = scmd; in megasas_build_and_issue_cmd()
1546 scmd->SCp.ptr = (char *)cmd; in megasas_build_and_issue_cmd()
1569 megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) in megasas_queue_command() argument
1575 scmd->device->host->hostdata; in megasas_queue_command()
1578 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1579 scmd->scsi_done(scmd); in megasas_queue_command()
1590 if (megasas_check_mpio_paths(instance, scmd) == in megasas_queue_command()
1596 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1597 scmd->scsi_done(scmd); in megasas_queue_command()
1604 scmd->result = DID_NO_CONNECT << 16; in megasas_queue_command()
1605 scmd->scsi_done(scmd); in megasas_queue_command()
1616 scmd->result = 0; in megasas_queue_command()
1618 if (MEGASAS_IS_LOGICAL(scmd) && in megasas_queue_command()
1619 (scmd->device->id >= instance->fw_supported_vd_count || in megasas_queue_command()
1620 scmd->device->lun)) { in megasas_queue_command()
1621 scmd->result = DID_BAD_TARGET << 16; in megasas_queue_command()
1625 switch (scmd->cmnd[0]) { in megasas_queue_command()
1631 scmd->result = DID_OK << 16; in megasas_queue_command()
1637 if (instance->instancet->build_and_issue_cmd(instance, scmd)) { in megasas_queue_command()
1645 scmd->scsi_done(scmd); in megasas_queue_command()
2322 if (reset_cmd->scmd) { in megasas_wait_for_outstanding()
2323 reset_cmd->scmd->result = DID_RESET << 16; in megasas_wait_for_outstanding()
2326 reset_cmd->scmd->cmnd[0]); in megasas_wait_for_outstanding()
2328 reset_cmd->scmd->scsi_done(reset_cmd->scmd); in megasas_wait_for_outstanding()
2444 static int megasas_generic_reset(struct scsi_cmnd *scmd) in megasas_generic_reset() argument
2449 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_generic_reset()
2451 scmd_printk(KERN_NOTICE, scmd, "megasas: RESET cmd=%x retries=%x\n", in megasas_generic_reset()
2452 scmd->cmnd[0], scmd->retries); in megasas_generic_reset()
2477 blk_eh_timer_return megasas_reset_timer(struct scsi_cmnd *scmd) in megasas_reset_timer() argument
2482 if (time_after(jiffies, scmd->jiffies_at_alloc + in megasas_reset_timer()
2487 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_timer()
2504 static int megasas_reset_device(struct scsi_cmnd *scmd) in megasas_reset_device() argument
2511 ret = megasas_generic_reset(scmd); in megasas_reset_device()
2519 static int megasas_reset_bus_host(struct scsi_cmnd *scmd) in megasas_reset_bus_host() argument
2523 instance = (struct megasas_instance *)scmd->device->host->hostdata; in megasas_reset_bus_host()
2532 ret = megasas_reset_fusion(scmd->device->host, 1); in megasas_reset_bus_host()
2534 ret = megasas_generic_reset(scmd); in megasas_reset_bus_host()
2871 if (cmd->scmd) in megasas_complete_cmd()
2872 cmd->scmd->SCp.ptr = NULL; in megasas_complete_cmd()
2903 cmd->scmd->result = alt_status << 16; in megasas_complete_cmd()
2911 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
2912 cmd->scmd->scsi_done(cmd->scmd); in megasas_complete_cmd()
2921 cmd->scmd->result = DID_OK << 16; in megasas_complete_cmd()
2926 cmd->scmd->result = in megasas_complete_cmd()
2932 cmd->scmd->result = (DID_OK << 16) | hdr->scsi_status; in megasas_complete_cmd()
2935 memset(cmd->scmd->sense_buffer, 0, in megasas_complete_cmd()
2937 memcpy(cmd->scmd->sense_buffer, cmd->sense, in megasas_complete_cmd()
2940 cmd->scmd->result |= DRIVER_SENSE << 24; in megasas_complete_cmd()
2947 cmd->scmd->result = DID_BAD_TARGET << 16; in megasas_complete_cmd()
2953 cmd->scmd->result = DID_ERROR << 16; in megasas_complete_cmd()
2959 scsi_dma_unmap(cmd->scmd); in megasas_complete_cmd()
2960 cmd->scmd->scsi_done(cmd->scmd); in megasas_complete_cmd()
3062 if (cmd->sync_cmd || cmd->scmd) { in megasas_issue_pending_cmds_again()
3065 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3073 cmd, cmd->scmd, cmd->sync_cmd); in megasas_issue_pending_cmds_again()
3082 if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3093 } else if (cmd->scmd) { in megasas_issue_pending_cmds_again()
3096 cmd, cmd->scmd->cmnd[0]); in megasas_issue_pending_cmds_again()
3149 if (cmd->sync_cmd == 1 || cmd->scmd) { in megasas_internal_reset_defer_cmds()
3152 defer_index, cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3158 cmd, cmd->sync_cmd, cmd->scmd); in megasas_internal_reset_defer_cmds()
3770 cmd->scmd = NULL; in megasas_alloc_cmds()